]> granicus.if.org Git - clang/commit
[CFG] [analyzer] Add construction context for implicit constructor conversions.
authorArtem Dergachev <artem.dergachev@gmail.com>
Fri, 9 Mar 2018 01:39:59 +0000 (01:39 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Fri, 9 Mar 2018 01:39:59 +0000 (01:39 +0000)
commit9935b466ba56fef43945676dbec41642b9a753d7
treec2b5dcbda8f3f55ed3b01fde2a83c5ecd9f92d2c
parent260e84dc7cb143af34c0875e487fde18486f5b03
[CFG] [analyzer] Add construction context for implicit constructor conversions.

Implicit constructor conversions such as A a = B() are represented by
surrounding the constructor for B() with an ImplicitCastExpr of
CK_ConstructorConversion kind, similarly to how explicit constructor conversions
are surrounded by a CXXFunctionalCastExpr. Support this syntax pattern when
extracting the construction context for the implicit constructor that
performs the conversion.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327096 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/CFG.cpp
lib/Analysis/ConstructionContext.cpp
test/Analysis/cfg-rich-constructors.cpp
test/Analysis/temporaries.cpp