[PATCH] D156027: [clang][Interp] Rework how initializers work
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 29 05:31:11 PDT 2023
tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:240
+ return Initializing ? this->visitInitializer(SubExpr)
+ : this->visit(SubExpr);
----------------
aaron.ballman wrote:
> tbaeder wrote:
> > This pattern shows up a few times, so it might make sense to add a function that simply passes on all the flags and doesn't do anything else. I'm just not sure what to call it.
> It's not clear to me when you should use this pattern to begin with.
Whenever you just pass on the visit, essentially ignoring the current node. Another good example is `ConstantExpr`s, where we don't do anything for the node and then just pass move on to the `SubExpr`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156027/new/
https://reviews.llvm.org/D156027
More information about the cfe-commits
mailing list