summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2015-04-15 01:21:42 +0000
committerRichard Trieu <rtrieu@google.com>2015-04-15 01:21:42 +0000
commitb58413323d23734cc5bf5451f855ce1e70d8bbde (patch)
treec031d89bfac6d88d4736ac6e3d5b0b127f99fc0d
parent6b1aa5f5e17d019115365cc7722c380b5bb02dc7 (diff)
downloadbcm5719-llvm-b58413323d23734cc5bf5451f855ce1e70d8bbde.tar.gz
bcm5719-llvm-b58413323d23734cc5bf5451f855ce1e70d8bbde.zip
Change range-based for-loops to be -Wrange-loop-analysis clean.
No functionality change. llvm-svn: 234964
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp2
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
-rw-r--r--clang/lib/CodeGen/CoverageMappingGen.cpp2
-rw-r--r--clang/lib/Sema/SemaLookup.cpp2
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index 269fb1c2553..36891021142 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -1680,7 +1680,7 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T,
Out << 'X';
} else {
// Happens for function pointer type arguments for example.
- for (const QualType Arg : Proto->param_types())
+ for (const QualType &Arg : Proto->param_types())
mangleArgumentType(Arg, Range);
// <builtin-type> ::= Z # ellipsis
if (Proto->isVariadic())
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 8175347f95c..4dd965f24a7 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -3431,7 +3431,7 @@ void CodeGenModule::ClearUnusedCoverageMapping(const Decl *D) {
void CodeGenModule::EmitDeferredUnusedCoverageMappings() {
std::vector<const Decl *> DeferredDecls;
- for (const auto I : DeferredEmptyCoverageMappingDecls) {
+ for (const auto &I : DeferredEmptyCoverageMappingDecls) {
if (!I.second)
continue;
DeferredDecls.push_back(I.first);
diff --git a/clang/lib/CodeGen/CoverageMappingGen.cpp b/clang/lib/CodeGen/CoverageMappingGen.cpp
index 07db6c74d11..d26eceded3c 100644
--- a/clang/lib/CodeGen/CoverageMappingGen.cpp
+++ b/clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -748,7 +748,7 @@ struct CounterCoverageMappingBuilder
size_t Index =
pushRegion(Counter::getZero(), getStart(CS->body_front()),
getEnd(CS->body_back()));
- for (const auto &Child : CS->children())
+ for (const auto *Child : CS->children())
Visit(Child);
popRegions(Index);
}
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 1244829f2ba..d471e89b9c6 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -3070,7 +3070,7 @@ static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result,
Result.getSema().ForceDeclarationOfImplicitMembers(Class);
// Enumerate all of the results in this context.
- for (const auto &R : Ctx->lookups()) {
+ for (const auto R : Ctx->lookups()) {
for (auto *D : R) {
if (auto *ND = Result.getAcceptableDecl(D)) {
Consumer.FoundDecl(ND, Visited.checkHidden(ND), Ctx, InBaseClass);
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 8e4fe85077f..f93a848b74f 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1747,7 +1747,7 @@ Sema::SubstBaseSpecifiers(CXXRecordDecl *Instantiation,
const MultiLevelTemplateArgumentList &TemplateArgs) {
bool Invalid = false;
SmallVector<CXXBaseSpecifier*, 4> InstantiatedBases;
- for (const auto Base : Pattern->bases()) {
+ for (const auto &Base : Pattern->bases()) {
if (!Base.getType()->isDependentType()) {
if (const CXXRecordDecl *RD = Base.getType()->getAsCXXRecordDecl()) {
if (RD->isInvalidDecl())
OpenPOWER on IntegriCloud