Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Change the title (this patch isn't adding any std:: things, it's adding llvm:: things that are equivalent to std:: things) and I think drop the "SHIM" macro (but we'll take that up in the precursor patch that introduces that macro)
Testing - I'm not a huge fan of stamping out tests with macros - makes the tests in some ways harder to read/understand what they're testing. Not sure it's better, but gtest does offer a type based test expansion - maybe you could use that?
| llvm/unittests/ADT/STLForwardCompatTest.cpp | ||
|---|---|---|
| 48–52 | The formatting here gets a bit muddy, I considered adding a typedef of std::pair with a longer name, so that the formatting would refer one entry per line. Does that seem like it would be an improvement? | |
| llvm/unittests/ADT/STLForwardCompatTest.cpp | ||
|---|---|---|
| 48–52 | I wouldn't change the type to force a different formatting - I think clang-format has some comment you can use to disable its formatting? Or you can add an empty comment to force a line break. using STLForwardCompatRemoveCVRefTestTypes = ::testing::Types<
// clang-format off
std::pair<int, int>,
std::pair<int &, int>,
std::pair<const int, int>,
std::pair<volatile int, int>,
std::pair<const volatile int &, int>,
std::pair<int *, int *>,
std::pair<int *const, int *>,
std::pair<const int *, const int *>,
std::pair<int *&, int *>
// clang-format on
>; | |
| llvm/unittests/ADT/STLForwardCompatTest.cpp | ||
|---|---|---|
| 48–52 | Ah, I wasn't aware that was possible, thank you! | |
The formatting here gets a bit muddy, I considered adding a typedef of std::pair with a longer name, so that the formatting would refer one entry per line. Does that seem like it would be an improvement?