[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 26 12:58:32 PST 2019
NoQ added a comment.
Herald added a subscriber: Charusso.
In D46421#1382017 <https://reviews.llvm.org/D46421#1382017>, @martong wrote:
> > I think you should change back to getInit()
> I am not entirely sure about this because the initalizer may not be attached to the canonical decl. `getInit()` gives the initializer of one given specific Decl, however, `getAnyInitializer()` searches through the whole redecl chain.
Ugh, indeed. `getDefinition()` is also not the thing we're looking for. What a mess :) Tests are welcome!~
P.S. I don't intend to block this patch; you guys know your stuff, i'm just displaying a bit of curiosity and observing how it unfolds.
CHANGES SINCE LAST ACTION
More information about the cfe-commits