summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp b/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
index dad9499ad4b..8694c642cd5 100644
--- a/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
+++ b/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
@@ -296,16 +296,16 @@ TEST_F(RegistryTest, VariadicOp) {
EXPECT_TRUE(matches("class Bar{};", D));
EXPECT_FALSE(matches("class OtherBar{};", D));
- D = constructMatcher(
- "recordDecl",
+ D = recordDecl(
+ has(fieldDecl(hasName("Foo"))),
constructMatcher(
"unless",
constructMatcher("namedDecl",
- constructMatcher("hasName", std::string("Bar")))))
- .getTypedMatcher<Decl>();
+ constructMatcher("hasName", std::string("Bar"))))
+ .getTypedMatcher<Decl>());
- EXPECT_FALSE(matches("class Bar{};", D));
- EXPECT_TRUE(matches("class OtherBar{};", D));
+ EXPECT_FALSE(matches("class Bar{ int Foo; };", D));
+ EXPECT_TRUE(matches("class OtherBar{ int Foo; };", D));
}
TEST_F(RegistryTest, Errors) {
OpenPOWER on IntegriCloud