[cfe-commits] r171889 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Rafael Espindola
rafael.espindola at gmail.com
Tue Jan 8 11:58:34 PST 2013
Author: rafael
Date: Tue Jan 8 13:58:34 2013
New Revision: 171889
URL: http://llvm.org/viewvc/llvm-project?rev=171889&view=rev
Log:
Move loop variable update.
Thanks to Dmitri Gribenko for the suggestion.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=171889&r1=171888&r2=171889&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Jan 8 13:58:34 2013
@@ -10501,11 +10501,10 @@
// and, because of the two phase lookup, this function is called with at
// decl in the middle of a decl chain. We loop to maintain the invariant
// that once a decl is used, all decls after it are also used.
- for (FunctionDecl *F = Func->getMostRecentDecl();;) {
+ for (FunctionDecl *F = Func->getMostRecentDecl();; F = F->getPreviousDecl()) {
F->setUsed(true);
if (F == Func)
break;
- F = F->getPreviousDecl();
}
}
More information about the cfe-commits
mailing list