Change range-based for-loops to be -Wrange-loop-analysis clean.

No functionality change.

llvm-svn: 234964
This commit is contained in:
Richard Trieu 2015-04-15 01:21:42 +00:00
parent 6b1aa5f5e1
commit b58413323d
5 changed files with 5 additions and 5 deletions

View File

@ -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())

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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())