diff --git a/clang/unittests/Introspection/IntrospectionTest.cpp b/clang/unittests/Introspection/IntrospectionTest.cpp index 2df401c8d813f..be58945c9a8d8 100644 --- a/clang/unittests/Introspection/IntrospectionTest.cpp +++ b/clang/unittests/Introspection/IntrospectionTest.cpp @@ -133,7 +133,7 @@ ns1::ns2::Foo ns1::ns2::Bar::Nested::method(int i, bool b) const auto BoundNodes = ast_matchers::match( decl(hasDescendant( - cxxMethodDecl(hasName("method")).bind("method"))), + cxxMethodDecl(hasName("method"), isDefinition()).bind("method"))), TU, Ctx); EXPECT_EQ(BoundNodes.size(), 1u);