Author: Timm Bäder
Date: 2022-11-07T09:42:41+01:00
New Revision: 5bd6bd12276ff5e5c38002cf607976e8ac9ed8a6

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

LOG: [clang][Interp][NFC] Simplify visitReturnStmt()

Added: 
    

Modified: 
    clang/lib/AST/Interp/ByteCodeStmtGen.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp 
b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
index 81243d846bc1..a6aa8d88622a 100644
--- a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
@@ -237,12 +237,11 @@ bool ByteCodeStmtGen<Emitter>::visitReturnStmt(const 
ReturnStmt *RS) {
       this->emitCleanup();
       return this->emitRetVoid(RS);
     }
-  } else {
-    this->emitCleanup();
-    if (!this->emitRetVoid(RS))
-      return false;
-    return true;
   }
+
+  // Void return.
+  this->emitCleanup();
+  return this->emitRetVoid(RS);
 }
 
 template <class Emitter>


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

Reply via email to