[PATCH] D120931: [clang-format] fix namepsace format when the name is macro expansion

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 3 14:48:28 PST 2022


MyDeveloperDay added inline comments.


================
Comment at: clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp:76
+            "int j;\n"
+            "}// namespace",
+            fixNamespaceEndComments("#define M(x) x##x\n"
----------------
but its not an anonymous namespace?

would

'''
}// namespace M(x)
'''

be clearer?


================
Comment at: clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp:86
+            "int j;\n"
+            "}// namespace A::M",
+            fixNamespaceEndComments("#define M(x) x##x\n"
----------------
same here its not A::M is it? at best its A::x but it depends on the macro ? or have I miss understood?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120931



More information about the cfe-commits mailing list