[clang][Interp][NFC] Simplify visitReturnStmt()
authorTimm Bäder <tbaeder@redhat.com>
Mon, 31 Oct 2022 07:33:30 +0000 (08:33 +0100)
committerTimm Bäder <tbaeder@redhat.com>
Mon, 7 Nov 2022 08:42:41 +0000 (09:42 +0100)
clang/lib/AST/Interp/ByteCodeStmtGen.cpp

index 81243d8..a6aa8d8 100644 (file)
@@ -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>