Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
371 |
Assuming my understanding is correct, this LGTM!
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
360 | 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? |
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
360 | Both LHS and RHS push a bool result to the stack, but the jumpTruewill 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. |
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
360 | Thank you for the confirmation, that makes sense to me. LGTM! |
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?