[clang-format] fix namepsace format when the name is macro expansion
authorZequan Wu <zequanwu@google.com>
Thu, 3 Mar 2022 19:59:57 +0000 (11:59 -0800)
committerZequan Wu <zequanwu@google.com>
Sat, 5 Mar 2022 00:01:17 +0000 (16:01 -0800)
commitbe5705767aad8d8eafd40225f7dba8e7e661c6b5
tree8ce1e97d533a342320a01429fd243d1cc4c1d420
parent9129743dde267f7ff678441c64bdfb9e24f7b448
[clang-format] fix namepsace format when the name is macro expansion

Originally filed at crbug.com/1184570.
When the name of a namespace is a macro that takes arguments,
- It fixed the indentation.
- It fixed the namepsace end comments.

Differential Revision: https://reviews.llvm.org/D120931
clang/lib/Format/NamespaceEndCommentsFixer.cpp
clang/lib/Format/UnwrappedLineParser.cpp
clang/unittests/Format/FormatTest.cpp
clang/unittests/Format/NamespaceEndCommentsFixerTest.cpp