[PATCH] D19979: [analyzer] ScopeContext - initial implementation

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 2 08:15:45 PDT 2016

NoQ added a comment.

^Another impressing test case for variable scopes, which should ideally be fixed by scope contexts, even though i doubt this patch (or the CFG patch) addresses this issue. Variable-length arrays might actually mess up things quite a bit.

Long story short, every time a goto jumps to before VLA was declared, it gets re-allocated. And we need to represent it as a different VarRegion for the same declaration. We could extend the region hierarchy to treat VLAs specially, but ideally it seems saner to me to make a VarRegion on top of a different scope memspace every time VLA is re-allocated.


More information about the cfe-commits mailing list