[clang] [clang][bytecode][NFC] Remove redundant isInvalidDecl() check (PR #215546)

via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 05:47:15 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

This is already checked earlier in the same function.

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


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/Interp.cpp (-4) 


``````````diff
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index ece2e71408731..5f2884d09b35e 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -1076,10 +1076,6 @@ static bool diagnoseCallableDecl(InterpState &S, CodePtr OpPC,
     return false;
   }
 
-  // Invalid decls have been diagnosed before.
-  if (DiagDecl->isInvalidDecl())
-    return false;
-
   // If this function is not constexpr because it is an inherited
   // non-constexpr constructor, diagnose that directly.
   const auto *CD = dyn_cast<CXXConstructorDecl>(DiagDecl);

``````````

</details>


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


More information about the cfe-commits mailing list