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

Matthias Gehre via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 15:59:34 PST 2015

mgehre created this revision.
mgehre added reviewers: krememek, jordan_rose.
mgehre added a subscriber: cfe-commits.

This mimics the implementation for the implicit destructors. The
generation of this scope leaving elements is hidden behind
a flag to the CFGBuilder, thus it should not affect existing code.

Currently, I'm missing a test (it's implicitly tested by the clang-tidy
lifetime checker that I'm proposing).
I though about a test using debug.DumpCFG, but then I would
have to add an option to StaticAnalyzer/Core/AnalyzerOptions
to enable the scope leaving CFGElement,
which would only be useful to that particular test.

Any other ideas how I could make a test for this feature?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15031.41278.patch
Type: text/x-patch
Size: 18773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151126/21b16d6f/attachment.bin>

More information about the cfe-commits mailing list