diff --git a/clang/lib/Tooling/Syntax/BuildTree.cpp b/clang/lib/Tooling/Syntax/BuildTree.cpp --- a/clang/lib/Tooling/Syntax/BuildTree.cpp +++ b/clang/lib/Tooling/Syntax/BuildTree.cpp @@ -1123,7 +1123,7 @@ syntax::CallArguments * buildCallArguments(CallExpr::arg_range ArgsAndDefaultArgs) { auto Args = dropDefaultArgs(ArgsAndDefaultArgs); - for (const auto &Arg : Args) { + for (auto *Arg : Args) { Builder.markExprChild(Arg, syntax::NodeRole::ListElement); const auto *DelimiterToken = std::next(Builder.findToken(Arg->getEndLoc()));