r208918 - Refactoring another for loop to use a range-based for loop instead. Also cleaned up a bit of formatting. No functional changes intended.
Aaron Ballman
aaron at aaronballman.com
Thu May 15 13:58:55 PDT 2014
Author: aaronballman
Date: Thu May 15 15:58:55 2014
New Revision: 208918
URL: http://llvm.org/viewvc/llvm-project?rev=208918&view=rev
Log:
Refactoring another for loop to use a range-based for loop instead. Also cleaned up a bit of formatting. No functional changes intended.
Modified:
cfe/trunk/lib/Sema/Sema.cpp
Modified: cfe/trunk/lib/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=208918&r1=208917&r2=208918&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.cpp (original)
+++ cfe/trunk/lib/Sema/Sema.cpp Thu May 15 15:58:55 2014
@@ -1086,19 +1086,12 @@ void Sema::PopFunctionScopeInfo(const An
// Issue any analysis-based warnings.
if (WP && D)
AnalysisWarnings.IssueWarnings(*WP, Scope, D, blkExpr);
- else {
- for (SmallVectorImpl<sema::PossiblyUnreachableDiag>::iterator
- i = Scope->PossiblyUnreachableDiags.begin(),
- e = Scope->PossiblyUnreachableDiags.end();
- i != e; ++i) {
- const sema::PossiblyUnreachableDiag &D = *i;
- Diag(D.Loc, D.PD);
- }
- }
+ else
+ for (const auto &PUD : Scope->PossiblyUnreachableDiags)
+ Diag(PUD.Loc, PUD.PD);
- if (FunctionScopes.back() != Scope) {
+ if (FunctionScopes.back() != Scope)
delete Scope;
- }
}
void Sema::PushCompoundScope() {
More information about the cfe-commits
mailing list