[clang] 5ab2a95 - [clang] Remove an else-after-return

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 11 11:25:23 PDT 2021


Author: Nico Weber
Date: 2021-10-11T14:24:58-04:00
New Revision: 5ab2a95edb62e67478095e4e5619a07efc95ee21

URL: https://github.com/llvm/llvm-project/commit/5ab2a95edb62e67478095e4e5619a07efc95ee21
DIFF: https://github.com/llvm/llvm-project/commit/5ab2a95edb62e67478095e4e5619a07efc95ee21.diff

LOG: [clang] Remove an else-after-return

Added: 
    

Modified: 
    clang/lib/Analysis/CFG.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 306da631d34a..50adc8c75bb5 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -3124,9 +3124,9 @@ CFGBlock *CFGBuilder::VisitReturnStmt(Stmt *S) {
     if (Expr *O = RS->getRetValue())
       return Visit(O, AddStmtChoice::AlwaysAdd, /*ExternallyDestructed=*/true);
     return Block;
-  } else { // co_return
-    return VisitChildren(S);
   }
+  // co_return
+  return VisitChildren(S);
 }
 
 CFGBlock *CFGBuilder::VisitSEHExceptStmt(SEHExceptStmt *ES) {


        


More information about the cfe-commits mailing list