]> granicus.if.org Git - clang/commit
[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)
commit25903b2d3f6caa41daecd98a6e3e1ff478eae6ce
tree7031e0c7beb297e54fe0e16fd9440f9d53a75ed1
parent4cf17d1623b434bd5ab42af1aa6f7f7630025558
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327352 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/CFG.h
lib/Analysis/CFG.cpp
test/Analysis/temp-obj-dtors-cfg-output.cpp
test/Analysis/temporaries.cpp