[PATCH] D48608: [CFG] [analyzer] Add construction contexts for C++ objects returned from Objective-C messages.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 26 14:17:16 PDT 2018
NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, george.karpenkov.
Herald added subscribers: cfe-commits, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware.
This patch extends https://reviews.llvm.org/D44120 to Objective-C messages that can also sometimes return C++ objects (in Objective-C++), but aren't inheriting from `CallExpr`. We'll now be able to properly destroy temporaries returned from such messages and/or materialize them. The analyzer picks up the newly added context automatically, as demonstrated by the new test case.
I removed the `getCallReturnType()` check because most of its branches aren't useful in our case.
Repository:
rC Clang
https://reviews.llvm.org/D48608
Files:
include/clang/Analysis/CFG.h
lib/Analysis/CFG.cpp
test/Analysis/cfg-rich-constructors.mm
test/Analysis/lifetime-extension.mm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48608.152960.patch
Type: text/x-patch
Size: 8425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180626/3f957350/attachment.bin>
More information about the cfe-commits
mailing list