[PATCH] D121269: [clang-format] Fix namepsace format when the name is after by a macro

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 8 23:32:32 PST 2022


MyDeveloperDay accepted this revision.
MyDeveloperDay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Format/NamespaceEndCommentsFixer.cpp:104
+          }
+          if (!FirstNSTok->is(tok::coloncolon)) {
+            NameFinished = true;
----------------
MyDeveloperDay wrote:
> Elide braces 
Ok ignore that


================
Comment at: clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp:192
                 "}"));
+  EXPECT_EQ("#define M(x) x##x\n"
+            "namespace A M(x) {\n"
----------------
Can you test the A B case? We can’t have a space right?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121269



More information about the cfe-commits mailing list