]> granicus.if.org Git - clang/commit
[CFG] Provide construction contexts for temproary objects.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 15 Feb 2018 03:13:36 +0000 (03:13 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 15 Feb 2018 03:13:36 +0000 (03:13 +0000)
commitd9839346b97a232b56335f681bf507bbc7d39e33
treedfb9960d2e82019d8f2d6fd4b467a302f62352ce
parent6b4c160f3b0276a6c39cfe5bfd7460f51279ca62
[CFG] Provide construction contexts for temproary objects.

Constructors of C++ temporary objects that have destructors now can be queried
to discover that they're indeed constructing temporary objects.

The respective CXXBindTemporaryExpr, which is also repsonsible for destroying
the temporary at the end of full-expression, is now available at the
construction site in the CFG. This is all the context we need to provide for
temporary objects that are not lifetime extended. For lifetime-extended
temporaries, more context is necessary.

Differential Revision: https://reviews.llvm.org/D43056

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325210 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/CFG.cpp
test/Analysis/auto-obj-dtors-cfg-output.cpp
test/Analysis/cfg-rich-constructors.cpp
test/Analysis/temp-obj-dtors-cfg-output.cpp