Index: clang/include/clang/Analysis/FlowSensitive/DataflowWorklist.h =================================================================== --- clang/include/clang/Analysis/FlowSensitive/DataflowWorklist.h +++ clang/include/clang/Analysis/FlowSensitive/DataflowWorklist.h @@ -69,7 +69,7 @@ : ForwardDataflowWorklist(Cfg, Ctx.getAnalysis()) {} void enqueueSuccessors(const CFGBlock *Block) { - for (const auto &B : Block->succs()) + for (auto B : Block->succs()) enqueueBlock(B); } }; @@ -85,7 +85,7 @@ Ctx.getAnalysis()->getComparator()) {} void enqueuePredecessors(const CFGBlock *Block) { - for (const auto &B : Block->preds()) + for (auto B : Block->preds()) enqueueBlock(B); } }; Index: clang/lib/AST/Type.cpp =================================================================== --- clang/lib/AST/Type.cpp +++ clang/lib/AST/Type.cpp @@ -745,7 +745,7 @@ memcpy(getTypeArgStorage(), typeArgs.data(), typeArgs.size() * sizeof(QualType)); - for (const auto &typeArg : typeArgs) { + for (auto typeArg : typeArgs) { addDependence(typeArg->getDependence() & ~TypeDependence::VariablyModified); } // Initialize the protocol qualifiers. The protocol storage is known Index: clang/lib/Sema/SemaCoroutine.cpp =================================================================== --- clang/lib/Sema/SemaCoroutine.cpp +++ clang/lib/Sema/SemaCoroutine.cpp @@ -1146,7 +1146,7 @@ Fn.CoroutinePromise->getType()->isDependentType()) { this->Body = Body; - for (const auto &KV : Fn.CoroutineParameterMoves) + for (auto KV : Fn.CoroutineParameterMoves) this->ParamMovesVector.push_back(KV.second); this->ParamMoves = this->ParamMovesVector; Index: clang/lib/Sema/SemaDeclCXX.cpp =================================================================== --- clang/lib/Sema/SemaDeclCXX.cpp +++ clang/lib/Sema/SemaDeclCXX.cpp @@ -801,7 +801,7 @@ << llvm::join(BadSpecifiers.begin(), BadSpecifiers.end(), " "); // Don't add FixItHints to remove the specifiers; we do still respect // them when building the underlying variable. - for (const auto &Loc : BadSpecifierLocs) + for (auto Loc : BadSpecifierLocs) Err << SourceRange(Loc, Loc); } else if (!CPlusPlus20Specifiers.empty()) { auto &&Warn = Diag(CPlusPlus20SpecifierLocs.front(),