[PATCH] D43483: [CFG] [analyzer] Add construction context when the constructor is on a branch of a ternary operator

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 19 14:46:46 PST 2018


NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs.

Similarly to https://reviews.llvm.org/D43480 and https://reviews.llvm.org/D43481, we need to skip the ternary conditional operator `... ? ... : ...` when it stands between the `MaterializeTemporaryExpr` and the `CXXBindTemporaryExpr`.

This allows us to find the common materialization target (`MaterializeTemporaryExpr`) for the two branches of the conditional operator, which would later be used for improving lifetime extension support in the analyzer, but for now the change has no immediate effect on the analyzer.

GNU binary conditional operator is not supported yet.


Repository:
  rC Clang

https://reviews.llvm.org/D43483

Files:
  lib/Analysis/CFG.cpp
  test/Analysis/cfg-rich-constructors.cpp
  test/Analysis/temp-obj-dtors-cfg-output.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43483.134972.patch
Type: text/x-patch
Size: 7795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180219/2db1293d/attachment.bin>


More information about the cfe-commits mailing list