[PATCH] D140809: [clang][Interp] Implement logical and/or operators
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 11 10:37:04 PST 2023
aaron.ballman added a comment.
Assuming my understanding is correct, this LGTM!
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:376
+ this->emitLabel(LabelTrue);
+ this->emitConstBool(true, E);
+ this->fallthrough(LabelEnd);
----------------
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?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140809/new/
https://reviews.llvm.org/D140809
More information about the cfe-commits
mailing list