[analyzer] Track class member initializer constructors path-sensitively.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 14 Jun 2018 01:40:49 +0000 (01:40 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 14 Jun 2018 01:40:49 +0000 (01:40 +0000)
commita84374dc0e4e756a92191dd55efca43165e3977d
tree35ea083c7a788a49faf594001a523918f9b68033
parent1fe52474d21a8ef90cc6abfb3469b761c20a42a1
[analyzer] Track class member initializer constructors path-sensitively.

The reasoning behind this change is similar to the previous commit, r334681.
Because members are already in scope when construction occurs, we are not
suffering from liveness problems, but we still want to figure out if the object
was constructed with construction context, because in this case we'll be able
to avoid trivial copy, which we don't always model perfectly. It'd also have
more importance when copy elision is implemented.

This also gets rid of the old CFG look-behind mechanism.

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

llvm-svn: 334682
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
clang/test/Analysis/cxx17-mandatory-elision.cpp