diff options
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
| -rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp index 5bc66f6c030..b4fc09084b8 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp @@ -4369,6 +4369,11 @@ TEST(NS, Anonymous) { EXPECT_TRUE(matches("namespace {}", namespaceDecl(isAnonymous()))); } +TEST(NS, Alias) { + EXPECT_TRUE(matches("namespace test {} namespace alias = ::test;", + namespaceAliasDecl(hasName("alias")))); +} + TEST(NNS, MatchesTypes) { NestedNameSpecifierMatcher Matcher = nestedNameSpecifier( specifiesType(hasDeclaration(recordDecl(hasName("A"))))); |

