[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

Felix Berger via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 5 06:02:47 PDT 2024


================
@@ -259,9 +258,9 @@ void UnnecessaryCopyInitialization::registerMatchers(MatchFinder *Finder) {
         .bind("blockStmt");
   };
 
-  Finder->addMatcher(LocalVarCopiedFrom(anyOf(isConstRefReturningFunctionCall(),
-                                              isConstRefReturningMethodCall(
-                                                  ExcludedContainerTypes))),
+  Finder->addMatcher(LocalVarCopiedFrom(anyOf(
+                         isConstRefReturningFunctionCall(),
+                         isRefReturningMethodCall(ExcludedContainerTypes))),
----------------
fberger wrote:

Could we call this `isRefReturningMethodCallWithConstOverloads()`?

https://github.com/llvm/llvm-project/pull/94362


More information about the cfe-commits mailing list