aaron.ballman accepted this revision. aaron.ballman added inline comments.
================ Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:376 + this->emitLabel(LabelTrue); + this->emitConstBool(true, E); + this->fallthrough(LabelEnd); ---------------- tbaeder wrote: > aaron.ballman wrote: > > Am I correct in understanding that the reason we don't need to emit a const > > bool for `false` is because visiting the RHS already pushes either `true` > > or `false` onto the stack because it's already been converted to a bool > > result? > Both LHS and RHS push a bool result to the stack, but the `jumpTrue`will > `pop()` the result of the LHS, so we need to push a true again if we want to > use it later as the result of the binary operator. Thank you for the confirmation, that makes sense to me. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140809/new/ https://reviews.llvm.org/D140809 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits