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

We check this both in Context and in ByteCodeEmitter. The latter is not 
reachable since the former will already not create Function instances for such 
functions.

>From 12255c68f1ff5329e89d12ce164e38ba7484089a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]>
Date: Mon, 31 Aug 2026 16:02:16 +0200
Subject: [PATCH] [clang][bytecode][NFC] Remove an unreachable parameter check

We check this both in Context and in ByteCodeEmitter. The latter is not
reachable since the former will already not create Function instances
for such functions.
---
 clang/lib/AST/ByteCode/ByteCodeEmitter.cpp | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/clang/lib/AST/ByteCode/ByteCodeEmitter.cpp 
b/clang/lib/AST/ByteCode/ByteCodeEmitter.cpp
index def93866fb0c9..bc1ef1bb6e7b2 100644
--- a/clang/lib/AST/ByteCode/ByteCodeEmitter.cpp
+++ b/clang/lib/AST/ByteCode/ByteCodeEmitter.cpp
@@ -26,11 +26,6 @@ void ByteCodeEmitter::compileFunc(const FunctionDecl 
*FuncDecl,
   assert(Func);
   assert(FuncDecl->isThisDeclarationADefinition());
 
-  // Manually created functions that haven't been assigned proper
-  // parameters yet.
-  if (!FuncDecl->param_empty() && !FuncDecl->param_begin())
-    return;
-
   // Set up lambda captures.
   if (Func->isLambdaCallOperator()) {
     // Set up lambda capture to closure record field mapping.

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to