[CFG] [analyzer] Don't add construction context to a return-by-reference call.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 12 Mar 2018 23:52:36 +0000 (23:52 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 12 Mar 2018 23:52:36 +0000 (23:52 +0000)
commit54ed6428b4337e1466390fe108c83c97156240d9
tree49407d72282d13c34412f46a256ed6c677d3a2f7
parentf159a389df95b77eeb32d1d653b2492b0b8b963f
[CFG] [analyzer] Don't add construction context to a return-by-reference call.

Call expressions that return objects by an lvalue reference or an rvalue
reference have a value type in the AST but wear an auxiliary flag of being an
lvalue or an xvalue respectively.

Use the helper method for obtaining the actual return type of the function.

Fixes a crash.

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

llvm-svn: 327352
clang/include/clang/Analysis/CFG.h
clang/lib/Analysis/CFG.cpp
clang/test/Analysis/temp-obj-dtors-cfg-output.cpp
clang/test/Analysis/temporaries.cpp