summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy')
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
index 8ad47505338..62c4c768e84 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
@@ -75,7 +75,7 @@ void SlicingCheck::DiagnoseSlicedOverriddenMethods(
const CXXRecordDecl &BaseDecl) {
if (DerivedDecl.getCanonicalDecl() == BaseDecl.getCanonicalDecl())
return;
- for (const auto &Method : DerivedDecl.methods()) {
+ for (const auto *Method : DerivedDecl.methods()) {
// Virtual destructors are OK. We're ignoring constructors since they are
// tagged as overrides.
if (isa<CXXConstructorDecl>(Method) || isa<CXXDestructorDecl>(Method))
diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
index e046023106b..bd736743ae1 100644
--- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
@@ -792,7 +792,7 @@ void IdentifierNamingCheck::check(const MatchFinder::MatchResult &Result) {
}
if (const auto *Decl = Result.Nodes.getNodeAs<UsingDecl>("using")) {
- for (const auto &Shadow : Decl->shadows()) {
+ for (const auto *Shadow : Decl->shadows()) {
addUsage(NamingCheckFailures, Shadow->getTargetDecl(),
Decl->getNameInfo().getSourceRange());
}
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;
OpenPOWER on IntegriCloud