Author: Morris Hafner
Date: 2025-06-04T11:52:47+02:00
New Revision: 4d6e44db8726d32e0edd47f41baf157986412858

URL: 
https://github.com/llvm/llvm-project/commit/4d6e44db8726d32e0edd47f41baf157986412858
DIFF: 
https://github.com/llvm/llvm-project/commit/4d6e44db8726d32e0edd47f41baf157986412858.diff

LOG: [CIR] Fix missing return value warning in maybePromoteBoolResult (#142673)

This is NFC and simply adds an llvm_unreachable

Added: 
    

Modified: 
    clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp 
b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
index 77287ec45972d..0d9252a55d280 100644
--- a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
@@ -104,6 +104,7 @@ class ScalarExprEmitter : public 
StmtVisitor<ScalarExprEmitter, mlir::Value> {
       return builder.createBoolToInt(value, dstTy);
     if (mlir::isa<cir::BoolType>(dstTy))
       return value;
+    llvm_unreachable("Can only promote integer or boolean types");
   }
 
   
//===--------------------------------------------------------------------===//


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to