diff --git a/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp index c8eab3288094..514f53b4804f 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp @@ -98,11 +98,13 @@ private: }; } -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)))); }