[clang] be65347 - NFC: Add missing matcher for test method

Stephen Kelly via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 15 15:26:44 PDT 2021


Author: Stephen Kelly
Date: 2021-04-15T23:26:00+01:00
New Revision: be65347326084ad1c309d4330e94d671f011b35b

URL: https://github.com/llvm/llvm-project/commit/be65347326084ad1c309d4330e94d671f011b35b
DIFF: https://github.com/llvm/llvm-project/commit/be65347326084ad1c309d4330e94d671f011b35b.diff

LOG: NFC: Add missing matcher for test method

The intention is to match the definition.

Added: 
    

Modified: 
    clang/unittests/Introspection/IntrospectionTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Introspection/IntrospectionTest.cpp b/clang/unittests/Introspection/IntrospectionTest.cpp
index 2df401c8d813..be58945c9a8d 100644
--- a/clang/unittests/Introspection/IntrospectionTest.cpp
+++ b/clang/unittests/Introspection/IntrospectionTest.cpp
@@ -133,7 +133,7 @@ ns1::ns2::Foo<A, B> ns1::ns2::Bar<T, U>::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);


        


More information about the cfe-commits mailing list