Skip to content

Commit abf2ec7

Browse files
tbaederrvinay-deshmukh
authored andcommitted
[clang][bytecode] Fix a std::optional<bool> mishap (llvm#167091)
This is about the value saved in the std::optional, not about whether the optional has a value at all.
1 parent 1ea852b commit abf2ec7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,7 @@ bool Compiler<Emitter>::VisitAbstractConditionalOperator(
25082508
};
25092509

25102510
if (std::optional<bool> BoolValue = getBoolValue(Condition)) {
2511-
if (BoolValue)
2511+
if (*BoolValue)
25122512
return visitChildExpr(TrueExpr);
25132513
return visitChildExpr(FalseExpr);
25142514
}

0 commit comments

Comments
 (0)