llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> This is about the value saved in the std::optional, not about whether the optional has a value at all. --- Full diff: https://github.com/llvm/llvm-project/pull/167091.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+2-1) ``````````diff diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index 84f7e6287609c..d0368feda0052 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "Compiler.h" +#include "ByteCode/Interp.h" #include "ByteCodeEmitter.h" #include "Context.h" #include "FixedPoint.h" @@ -2508,7 +2509,7 @@ bool Compiler<Emitter>::VisitAbstractConditionalOperator( }; if (std::optional<bool> BoolValue = getBoolValue(Condition)) { - if (BoolValue) + if (*BoolValue) return visitChildExpr(TrueExpr); return visitChildExpr(FalseExpr); } `````````` </details> https://github.com/llvm/llvm-project/pull/167091 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
