[PATCH] D135750: [clang][Interp] Track initialization state of local variables
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 21 13:15:01 PST 2022
shafik added inline comments.
================
Comment at: clang/lib/AST/Interp/Interp.h:918
return false;
+ if (!Ptr.isRoot())
+ Ptr.initialize();
----------------
tbaeder wrote:
> shafik wrote:
> > Can you explain what is going on here? Why do we need to initialize if it is not root?
> Root means that `Base == 0`, so it cannot have a `InlineDescriptor` before the `Base` offset. That is mainly the case for global variables.
Can we add a comment that explains this a little better? I still don't get the significance, so I definitely missing something.
Also, why do we initialized before the store?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135750/new/
https://reviews.llvm.org/D135750
More information about the cfe-commits
mailing list