[PATCH] D134801: [clang][Interp] Implement ConditionalOperators
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 28 13:28:41 PDT 2022
shafik added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:357
+
+ if (!this->visit(Condition))
+ return false;
----------------
tbaeder wrote:
> shafik wrote:
> > Maybe I am misunderstanding what this is doing but can't we just check the result of the condition and then just visit either the true or false branch?
> That's what this code is doing in the "eval case" (i.e Emitter = EvalEmitter), but when we're emitting bytecode, we can of course not just check the condition but need to do that when the byte code is emitted.
>
> That is, if I understand the question correctly.
Makes sense, just me being dense then.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134801/new/
https://reviews.llvm.org/D134801
More information about the cfe-commits
mailing list