summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 713ef5a84fe..fc983737f4a 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -3000,6 +3000,9 @@ TEST(Matcher, HasAnyName) {
EXPECT_TRUE(notMatches(Code, recordDecl(hasAnyName("::C", "::b::C"))));
EXPECT_TRUE(
matches(Code, recordDecl(hasAnyName("::C", "::b::C", "::a::b::C"))));
+
+ std::vector<StringRef> Names = {"::C", "::b::C", "::a::b::C"};
+ EXPECT_TRUE(matches(Code, recordDecl(hasAnyName(Names))));
}
TEST(Matcher, IsDefinition) {
OpenPOWER on IntegriCloud