]> granicus.if.org Git - clang/commit
[analyzer] Don't communicate evaluation failures through memregion hierarchy.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 1 Feb 2018 22:17:05 +0000 (22:17 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 1 Feb 2018 22:17:05 +0000 (22:17 +0000)
commit7a8e626f21921c75c04088c8ec0874c668256ade
treec810ad57706dec60aecdeec907a9663dc1417c99
parentf61575826a1eef7d0c0198d6f444894ec72ea394
[analyzer] Don't communicate evaluation failures through memregion hierarchy.

We use CXXTempObjectRegion exclusively as a bailout value for construction
targets when we are unable to find the correct construction region.
Sometimes it works correctly, but rather accidentally than intentionally.

Now that we want to increase the amount of situations where it works correctly,
the first step is to introduce a different way of communicating our failure
to find the correct construction region. EvalCallOptions are introduced
for this purpose.

For now EvalCallOptions are communicating two kinds of problems:
- We have been completely unable to find the correct construction site.
- We have found the construction site correctly, and there's more than one of
  them (i.e. array construction which we currently don't support).

Accidentally find and fix a test in which the new approach to communicating
failures produces better results.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324018 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
test/Analysis/new.cpp