diff options
author | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 17:23:21 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 20:01:37 +0100 |
commit | 8dc7b982b4556c243e0502e6e230bdd53ddd65ff (patch) | |
tree | 518a39bbece25299e56350272605c7a9bd8f60c6 /clang-tools-extra/clang-tidy/utils | |
parent | 9b24dad6c06bba771b805ffd9bd047af25317e52 (diff) | |
download | bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.tar.gz bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.zip |
[NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D71857
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils')
-rw-r--r-- | clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp | 2 | ||||
-rw-r--r-- | clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp b/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp index 628b8506811..53f9336b6fc 100644 --- a/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp +++ b/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp @@ -23,7 +23,7 @@ using llvm::SmallPtrSet; namespace { template <typename S> bool isSetDifferenceEmpty(const S &S1, const S &S2) { - for (const auto &E : S1) + for (auto E : S1) if (S2.count(E) == 0) return false; return true; diff --git a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp index 09fce323120..e8bccd7d6bf 100644 --- a/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp +++ b/clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp @@ -125,7 +125,7 @@ ExceptionAnalyzer::ExceptionInfo ExceptionAnalyzer::throwsException( auto Result = ExceptionInfo::createUnknown(); if (const auto *FPT = Func->getType()->getAs<FunctionProtoType>()) { - for (const QualType Ex : FPT->exceptions()) + for (const QualType &Ex : FPT->exceptions()) Result.registerException(Ex.getTypePtr()); } return Result; |