]> granicus.if.org Git - clang/commit
[analyzer] Support temporaries conjured by conservatively evaluated functions.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 12 Mar 2018 23:36:12 +0000 (23:36 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 12 Mar 2018 23:36:12 +0000 (23:36 +0000)
commit4cf17d1623b434bd5ab42af1aa6f7f7630025558
treec58afd9cbeb72ccb5746cf3829ca21743a0216fc
parentb2dc2834caf722e596798f13e54525778ddc10ef
[analyzer] Support temporaries conjured by conservatively evaluated functions.

Properly perform destruction and lifetime extension of such temporaries.

C++ object-type return values of conservatively evaluated functions are now
represented as compound values of well-defined temporary object regions. The
function creates a region that represents the temporary object and will later
be used for destruction or materialization, invalidates it, and returns the
invalidated compound value of the object.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327348 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
test/Analysis/explain-svals.cpp
test/Analysis/temporaries.cpp