Skip to content

Commit 4d6e44d

Browse files
authored
[CIR] Fix missing return value warning in maybePromoteBoolResult (#142673)
This is NFC and simply adds an llvm_unreachable
1 parent e2c698c commit 4d6e44d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
104104
return builder.createBoolToInt(value, dstTy);
105105
if (mlir::isa<cir::BoolType>(dstTy))
106106
return value;
107+
llvm_unreachable("Can only promote integer or boolean types");
107108
}
108109

109110
//===--------------------------------------------------------------------===//

0 commit comments

Comments
 (0)