Skip to content

Commit 6c12623

Browse files
authored
[clang][bytecode] Fix a std::optional<bool> mishap (#167091)
This is about the value saved in the std::optional, not about whether the optional has a value at all.
1 parent b4b57ad commit 6c12623

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)