]> granicus.if.org Git - clang/commit
[CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.
authorArtem Dergachev <artem.dergachev@gmail.com>
Fri, 30 Mar 2018 19:25:39 +0000 (19:25 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Fri, 30 Mar 2018 19:25:39 +0000 (19:25 +0000)
commitfe12415cbaac2be6f3e51113f900f36cacee55d7
treec52a14ca7c98cd5582a91e8ac337bede1dc434cc
parenta83ee8e3d18648165fcdc7782981578669fa1c63
[CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.

Sometimes template instantiation causes CXXBindTemporaryExpr to be missing in
its usual spot. In CFG, temporary destructors work by relying on
CXXBindTemporaryExprs, so they won't work in this case.

Avoid the crash and notify the clients that we've encountered an unsupported AST
by failing to provide the ill-formed construction context for the temporary.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328895 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/ConstructionContext.h
lib/Analysis/CFG.cpp
lib/Analysis/ConstructionContext.cpp
test/Analysis/missing-bind-temporary.cpp [new file with mode: 0644]