[clang] [clang][bytecode][NFC] Remove containsErrors() check from delegate (PR #105804)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 23 02:07:26 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

This check was removed a while ago from visit(), remove it from delegate() as well.

---
Full diff: https://github.com/llvm/llvm-project/pull/105804.diff


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/Compiler.cpp (-3) 


``````````diff
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp
index 3a3927a9671345..fb2fcbbb90302c 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -3262,9 +3262,6 @@ template <class Emitter> bool Compiler<Emitter>::discard(const Expr *E) {
 }
 
 template <class Emitter> bool Compiler<Emitter>::delegate(const Expr *E) {
-  if (E->containsErrors())
-    return this->emitError(E);
-
   // We're basically doing:
   // OptionScope<Emitter> Scope(this, DicardResult, Initializing);
   // but that's unnecessary of course.

``````````

</details>


https://github.com/llvm/llvm-project/pull/105804


More information about the cfe-commits mailing list