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

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 05:46:40 PDT 2026


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

This is already checked earlier in the same function.

>From 1420f6f2a6a96712040c976261c0946e8f7a4559 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Tue, 11 Aug 2026 14:44:57 +0200
Subject: [PATCH] [clang][bytecode][NFC] Remove redundant isInvalidDecl() check

This is already checked earlier in the same function.
---
 clang/lib/AST/ByteCode/Interp.cpp | 4 ----
 1 file changed, 4 deletions(-)

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);



More information about the cfe-commits mailing list