summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2016-11-30 19:02:44 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2016-11-30 19:02:44 +0000
commit28ee2d1b0973df3295cd7eadb45473037e530ed9 (patch)
treed5e0db825484edad850da932427927fd3fb207c5 /llvm/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp
parent387afc937544c353bd55e753a9d63acd5150b404 (diff)
downloadbcm5719-llvm-28ee2d1b0973df3295cd7eadb45473037e530ed9.tar.gz
bcm5719-llvm-28ee2d1b0973df3295cd7eadb45473037e530ed9.zip
[analyzer] Construct temporary objects of correct types, destroy them properly.
When constructing a temporary object region, which represents the result of MaterializeTemporaryExpr, track down the sub-expression for which the temporary is necessary with a trick similar to the approach used in CodeGen, namely by using Expr::skipRValueSubobjectAdjustments(). Then, create the temporary object region with type of that sub-expression. That type would propagate further in a path-sensitive manner. During destruction of lifetime-extened temporaries, consult the type of the temporary object region, rather than the type of the lifetime-extending variable, in order to call the correct destructor (fixes pr17001) and, at least, not to crash by trying to call a destructor of a plain type (fixes pr19539). rdar://problem/29131302 rdar://problem/29131576 Differential Revision: https://reviews.llvm.org/D26839 llvm-svn: 288263
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud