Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -334,7 +334,7 @@ StringRef CheckerAndPackageList = A->getValue(); SmallVector CheckersAndPackages; CheckerAndPackageList.split(CheckersAndPackages, ","); - for (const StringRef CheckerOrPackage : CheckersAndPackages) + for (const StringRef &CheckerOrPackage : CheckersAndPackages) Opts.CheckersAndPackages.emplace_back(CheckerOrPackage, IsEnabled); } @@ -476,7 +476,7 @@ SmallVector CheckersAndPackages; AnOpts.RawSilencedCheckersAndPackages.split(CheckersAndPackages, ";"); - for (const StringRef CheckerOrPackage : CheckersAndPackages) { + for (const StringRef &CheckerOrPackage : CheckersAndPackages) { if (Diags) { bool IsChecker = CheckerOrPackage.contains('.'); bool IsValidName = @@ -607,7 +607,7 @@ XRayInstrSet &S) { llvm::SmallVector BundleParts; llvm::SplitString(Bundle, BundleParts, ","); - for (const auto B : BundleParts) { + for (const auto &B : BundleParts) { auto Mask = parseXRayInstrValue(B); if (Mask == XRayInstrKind::None) if (B != "none")