[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)
commitf43ac4c9acb023ac9fd44e2836d852dc5ce9d0e2
tree0714098b841f63be926b7b2a609eb70ebd9bc487
parentc9f0b65f5460a29f1fbd99b9ab59d7dd305a558b
[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

llvm-svn: 326014
clang/include/clang/Analysis/CFG.h
clang/lib/Analysis/CFG.cpp
clang/test/Analysis/cfg-rich-constructors.cpp
clang/test/Analysis/temp-obj-dtors-cfg-output.cpp