[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 05:30:25 PDT 2020


arichardson added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:8333
 
+TEST_F(FormatTest, UnderstandsUsesOfStarAndAmpInMacroDefinition) {
+  // This is a regression test for mis-parsing the & after decltype as a binary
----------------
klimek wrote:
> I'd put this into a new test file that specifically tests annotations, perhaps AnnotationTest.cpp?
> 
> Also, the test name seems misleading, as not all of these are macro definitions?
The regression is the second definition which is a macro definition, I guess I could drop the first test.


================
Comment at: clang/unittests/Format/FormatTest.cpp:8333
 
+TEST_F(FormatTest, UnderstandsUsesOfStarAndAmpInMacroDefinition) {
+  // This is a regression test for mis-parsing the & after decltype as a binary
----------------
arichardson wrote:
> klimek wrote:
> > I'd put this into a new test file that specifically tests annotations, perhaps AnnotationTest.cpp?
> > 
> > Also, the test name seems misleading, as not all of these are macro definitions?
> The regression is the second definition which is a macro definition, I guess I could drop the first test.
Moving it to a separate file probably makes sense, but then I'd have to drop the verifyFormat() calls.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88956/new/

https://reviews.llvm.org/D88956



More information about the cfe-commits mailing list