[clang] [CIR] Fix missing return value warning in maybePromoteBoolResult (PR #142673)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 3 14:23:08 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Morris Hafner (mmha)
<details>
<summary>Changes</summary>
This is NFC and simply adds an llvm_unreachable
---
Full diff: https://github.com/llvm/llvm-project/pull/142673.diff
1 Files Affected:
- (modified) clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp (+1)
``````````diff
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");
}
//===--------------------------------------------------------------------===//
``````````
</details>
https://github.com/llvm/llvm-project/pull/142673
More information about the cfe-commits
mailing list