[CFG] [analyzer] Avoid modeling C++17 constructors that aren't fully supported.
authorArtem Dergachev <artem.dergachev@gmail.com>
Fri, 30 Mar 2018 19:21:18 +0000 (19:21 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Fri, 30 Mar 2018 19:21:18 +0000 (19:21 +0000)
commit9d3a7d8b2badf05a52188e2874a1e53c1416e279
tree692008944c764fdc963025a945d3253da3381820
parentdc97172b2fb7452bdd9e841e4b2d5049fbdd9275
[CFG] [analyzer] Avoid modeling C++17 constructors that aren't fully supported.

Not enough work has been done so far to ensure correctness of construction
contexts in the CFG when C++17 copy elision is in effect, so for now we
should drop construction contexts in the CFG and in the analyzer when
they seem different from what we support anyway.

This includes initializations with conditional operators and return values
across multiple stack frames.

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

llvm-svn: 328893
clang/lib/Analysis/CFG.cpp
clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
clang/test/Analysis/cfg-rich-constructors.cpp
clang/test/Analysis/cxx17-mandatory-elision.cpp [new file with mode: 0644]
clang/test/Analysis/temp-obj-dtors-cfg-output.cpp