Author: Nico Weber
Date: 2021-10-26T09:45:22-04:00
New Revision: 0b7c9addce69ca089a23334490758907dd4ab0db

URL: 
https://github.com/llvm/llvm-project/commit/0b7c9addce69ca089a23334490758907dd4ab0db
DIFF: 
https://github.com/llvm/llvm-project/commit/0b7c9addce69ca089a23334490758907dd4ab0db.diff

LOG: [clang] Make loop in CFGBuilder::VisitCXXTryStmt() more canonical

No behavior change.

Added: 
    

Modified: 
    clang/lib/Analysis/CFG.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 39c0f14c7b89..18598e6eba33 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -4338,10 +4338,10 @@ CFGBlock *CFGBuilder::VisitCXXTryStmt(CXXTryStmt 
*Terminator) {
   NewTryTerminatedBlock->setTerminator(Terminator);
 
   bool HasCatchAll = false;
-  for (unsigned h = 0; h <Terminator->getNumHandlers(); ++h) {
+  for (unsigned I = 0, E = Terminator->getNumHandlers(); I != E; ++I) {
     // The code after the try is the implicit successor.
     Succ = TrySuccessor;
-    CXXCatchStmt *CS = Terminator->getHandler(h);
+    CXXCatchStmt *CS = Terminator->getHandler(I);
     if (CS->getExceptionDecl() == nullptr) {
       HasCatchAll = true;
     }


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to