Index: clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp =================================================================== --- clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp +++ 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)))); }