================ @@ -164,16 +161,19 @@ ast_matchers::StatementMatcher isPointerLikeOperatorArrow() { ofClass(pointerClass())))); } -ast_matchers::StatementMatcher isSmartPointerLikeValueMethodCall() { +ast_matchers::StatementMatcher +isSmartPointerLikeValueMethodCall(clang::StringRef MethodName) { return cxxMemberCallExpr(callee(cxxMethodDecl( parameterCountIs(0), returns(hasCanonicalType(referenceType())), - hasName("value"), ofClass(smartPointerClassWithValue())))); + hasName(MethodName), ---------------- jvoung wrote:
Just checking -- is the plan later to have something like anyOf(isSmartPointerLikeValueMethodCall(Name1), isSmartPointerLikeValueMethodCall(Name2)), etc. ? Or at some point add a matcher isSmartPointerLikeValueMethodCallAnyOf(Name1, Name2)... using hasAnyName() ? https://github.com/llvm/llvm-project/pull/133350 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits