diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-11-13 05:55:56 +0000 | 
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-11-13 05:55:56 +0000 | 
| commit | bc8b3788480f7648d34dad7aed292d37f681d750 (patch) | |
| tree | 70abe3ed8f7be596aa8781c33240905ebb481bd9 | |
| parent | 89bad8a6e754de49a0e0d4dd00c3f8dfeb823425 (diff) | |
| download | bcm5719-llvm-bc8b3788480f7648d34dad7aed292d37f681d750.tar.gz bcm5719-llvm-bc8b3788480f7648d34dad7aed292d37f681d750.zip | |
Rewrite reverse iteration loop in a more natural countdown manner.
llvm-svn: 118990
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 062a3672912..72726e385a2 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -1805,10 +1805,8 @@ void EnqueueVisitor::VisitCXXNewExpr(CXXNewExpr *E) {      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));  } | 

