[PATCH] D71530: [Frontend] Fixes -Wrange-loop-analysis warnings
Mark de Wever via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 17 12:54:29 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG385339034f08: [Frontend] Fixes -Wrange-loop-analysis warnings (authored by Mordante).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71530/new/
https://reviews.llvm.org/D71530
Files:
clang/lib/Frontend/CompilerInvocation.cpp
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<StringRef, 16> 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<StringRef, 16> 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<StringRef, 2> 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")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71530.234367.patch
Type: text/x-patch
Size: 1364 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191217/4b6f7763/attachment.bin>
More information about the cfe-commits
mailing list