[llvm-branch-commits] [cfe-branch] r119643 - /cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
Daniel Dunbar
daniel at zuster.org
Wed Nov 17 18:37:16 PST 2010
Author: ddunbar
Date: Wed Nov 17 20:37:16 2010
New Revision: 119643
URL: http://llvm.org/viewvc/llvm-project?rev=119643&view=rev
Log:
Merge r118990:
--
Author: Ted Kremenek <kremenek at apple.com>
Date: Sat Nov 13 05:55:56 2010 +0000
Rewrite reverse iteration loop in a more natural countdown manner.
Modified:
cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
Modified: cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp?rev=119643&r1=119642&r2=119643&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp (original)
+++ cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp Wed Nov 17 20:37:16 2010
@@ -1820,10 +1820,8 @@
AddStmt(E->getPlacementArg(I-1));
}
void EnqueueVisitor::VisitCXXOperatorCallExpr(CXXOperatorCallExpr *CE) {
- // Note that we enqueue things in reverse order so that
- // they are visited correctly by the DFS.
- for (unsigned I = 1, N = CE->getNumArgs(); I != N; ++I)
- AddStmt(CE->getArg(N-I));
+ for (unsigned I = CE->getNumArgs(); I > 1 /* Yes, this is 1 */; --I)
+ AddStmt(CE->getArg(I-1));
AddStmt(CE->getCallee());
AddStmt(CE->getArg(0));
}
More information about the llvm-branch-commits
mailing list