Consistently print anonymous namespace names as "<anonymous namespace>"
For some reason we have two bits of code handling this printing:
lib/AST/Decl.cpp: OS << "<anonymous namespace>";
lib/AST/TypePrinter.cpp: OS << "<anonymous namespace>::";
it would be nice if we only had one...
llvm-svn: 201437
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 5c9753f..669978b 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -1038,7 +1038,7 @@
EXPECT_TRUE(matches("namespace ns { struct A {}; } struct B { ns::A a; };",
fieldDecl(hasType(asString("ns::A")))));
EXPECT_TRUE(matches("namespace { struct A {}; } struct B { A a; };",
- fieldDecl(hasType(asString("struct <anonymous>::A")))));
+ fieldDecl(hasType(asString("struct <anonymous namespace>::A")))));
}
TEST(Matcher, OverloadedOperatorCall) {