]> granicus.if.org Git - clang/commit
[CFG] Provide construction contexts for lifetime-extended temporaries.
authorArtem Dergachev <artem.dergachev@gmail.com>
Sat, 24 Feb 2018 02:00:30 +0000 (02:00 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Sat, 24 Feb 2018 02:00:30 +0000 (02:00 +0000)
commitedbe243cbd26f2686b04b30f6be61bd370511c57
tree05e27c0b67df305a578f5b5ac9e87d2d8ef1a617
parent433c43a3616692a4b657915264e0b7daccfbfe05
[CFG] Provide construction contexts for lifetime-extended temporaries.

When constructing a temporary that is going to be lifetime-extended through a
MaterializeTemporaryExpr later, CFG elements for the respective constructor
can now be queried to obtain the reference to that MaterializeTemporaryExpr
and therefore gain information about lifetime extension.

This may produce multi-layered construction contexts when information about
both temporary destruction and lifetime extension is available.

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

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