diff options
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/dyncastvisibility.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/external.cxx | 2 | ||||
-rw-r--r-- | compilerplugins/clang/fakebool.cxx | 8 | ||||
-rw-r--r-- | compilerplugins/clang/salcall.cxx | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/compilerplugins/clang/dyncastvisibility.cxx b/compilerplugins/clang/dyncastvisibility.cxx index 788506ee2250..3c54f7cf8929 100644 --- a/compilerplugins/clang/dyncastvisibility.cxx +++ b/compilerplugins/clang/dyncastvisibility.cxx @@ -46,7 +46,7 @@ bool isDerivedFrom( bool * hidden) { bool derived = false; - for (auto const i: decl->bases()) { + for (auto const & i: decl->bases()) { auto const bd = (cast<CXXRecordDecl>(i.getType()->getAs<RecordType>()->getDecl()) ->getDefinition()); diff --git a/compilerplugins/clang/external.cxx b/compilerplugins/clang/external.cxx index bc75237a15fd..e3bc67f19c46 100644 --- a/compilerplugins/clang/external.cxx +++ b/compilerplugins/clang/external.cxx @@ -421,7 +421,7 @@ private: { continue; } - for (auto const t : affected) + for (auto const& t : affected) { auto const tc = t.getCanonicalType(); for (auto p = f->param_begin(); p != f->param_end(); ++p) diff --git a/compilerplugins/clang/fakebool.cxx b/compilerplugins/clang/fakebool.cxx index 804f1d51afa1..277dd915bf0d 100644 --- a/compilerplugins/clang/fakebool.cxx +++ b/compilerplugins/clang/fakebool.cxx @@ -235,7 +235,7 @@ private: void FakeBool::run() { if (compiler.getLangOpts().CPlusPlus) { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); - for (auto const dcl: varDecls_) { + for (auto const & dcl: varDecls_) { auto const decl = dcl.first; auto const fbk = dcl.second; SourceLocation loc { compat::getBeginLoc(decl) }; TypeSourceInfo * tsi = decl->getTypeSourceInfo(); @@ -277,7 +277,7 @@ void FakeBool::run() { << decl->getSourceRange(); } } - for (auto const dcl: fieldDecls_) { + for (auto const & dcl: fieldDecls_) { auto const decl = dcl.first; auto const fbk = dcl.second; SourceLocation loc { compat::getBeginLoc(decl) }; TypeSourceInfo * tsi = decl->getTypeSourceInfo(); @@ -319,7 +319,7 @@ void FakeBool::run() { } } auto const ignoredFns = getFunctionsWithAddressTaken(); - for (auto const dcl: parmVarDecls_) { + for (auto const & dcl: parmVarDecls_) { auto const decl = dcl.first; auto const fbk = dcl.second; FunctionDecl const * f = cast<FunctionDecl>(decl->getDeclContext())->getCanonicalDecl(); if (ignoredFns.find(f) != ignoredFns.end()) { @@ -393,7 +393,7 @@ void FakeBool::run() { << decl->getSourceRange(); } } - for (auto const dcl: functionDecls_) { + for (auto const & dcl: functionDecls_) { auto const decl = dcl.first; auto const fbk = dcl.second; FunctionDecl const * f = decl->getCanonicalDecl(); if (ignoredFns.find(f) != ignoredFns.end()) { diff --git a/compilerplugins/clang/salcall.cxx b/compilerplugins/clang/salcall.cxx index 3c91e76b870a..e70e6477f2b0 100644 --- a/compilerplugins/clang/salcall.cxx +++ b/compilerplugins/clang/salcall.cxx @@ -609,7 +609,7 @@ bool SalCall::isSalCallFunction(FunctionDecl const* functionDecl, SourceLocation } ranges.emplace_back(startLoc, endLoc); - for (auto const range : ranges) + for (auto const& range : ranges) { if (range.isInvalid()) { |