aboutsummaryrefslogtreecommitdiff
path: root/unittests/ASTMatchers/ASTMatchersTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r--unittests/ASTMatchers/ASTMatchersTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/unittests/ASTMatchers/ASTMatchersTest.cpp b/unittests/ASTMatchers/ASTMatchersTest.cpp
index 565c356235..53620a0294 100644
--- a/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -3436,8 +3436,10 @@ TEST(TypeMatching, MatchesTemplateSpecializationType) {
TEST(TypeMatching, MatchesRecordType) {
EXPECT_TRUE(matches("class C{}; C c;", recordType()));
- EXPECT_TRUE(matches("struct S{}; S s;", recordType()));
- EXPECT_TRUE(notMatches("int i;", recordType()));
+ EXPECT_TRUE(matches("struct S{}; S s;",
+ recordType(hasDeclaration(recordDecl(hasName("S"))))));
+ EXPECT_TRUE(notMatches("int i;",
+ recordType(hasDeclaration(recordDecl(hasName("S"))))));
}
TEST(TypeMatching, MatchesElaboratedType) {