diff --git a/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp @@ -98,11 +98,13 @@ }; } -static inline std::vector toRefs(std::vector V) { +static inline std::vector +toRefs(const std::vector &V) { return std::vector(V.begin(), V.end()); } -static decltype(auto) callsNames(std::vector FunctionNames) { +static decltype(auto) +callsNames(const std::vector &FunctionNames) { return callee(functionDecl(hasAnyName(toRefs(FunctionNames)))); }