Author: Timm Baeder
Date: 2026-08-31T17:12:09+02:00
New Revision: 702e97a49e233254ecafad1c6415c5488cbbd0f0

URL: 
https://github.com/llvm/llvm-project/commit/702e97a49e233254ecafad1c6415c5488cbbd0f0
DIFF: 
https://github.com/llvm/llvm-project/commit/702e97a49e233254ecafad1c6415c5488cbbd0f0.diff

LOG: [clang][bytecode][NFC] Remove an unreachable parameter check (#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.

Added: 
    

Modified: 
    clang/lib/AST/ByteCode/ByteCodeEmitter.cpp

Removed: 
    


################################################################################
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