[PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

Matthias Gehre via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 10 10:59:03 PST 2017


mgehre added a comment.

I'm sorry for the long delay!

Regarding " I think it would also be good to (eventually) add CFGElements marking when the storage duration for underlying storage ends.":
>From what I understand, this only differs from the end of lifetime in case of objects with non-trivial destructors, where the lifetime ends before
the destructor is called and the storage duration ends afterwards.
In which case is this difference important to the static analyzer? Accessing an object after its lifetime ended is already UB, so the static analyzer could warn on this,
even before the storage duration for underlying storage ends.


https://reviews.llvm.org/D15031





More information about the cfe-commits mailing list