[PATCH] An attempt at fixing lifetime extended temporaries in the CFG.

Manuel Klimek klimek at google.com
Tue Jul 29 08:55:36 PDT 2014


Hi jordan_rose,

Fix handling of lifetime extended temporaries by using the
MaterializeTemporaryExpr as indication of whether a temporary was actually
extended. As lifetime extended temporaries do not necessarily have VarDecls,
changes the type of the destructors for those to reuse CFGTemopraryDtor.

Open problems:
- temporary dtors are not yet inlined, but some tests rely on dtor inlining
  for lifetime extended temporaries
- there are still missing cases for when we do not want to continue digging
  through the AST for the CXXBindTemporaryExpr after hitting a
  MaterializeTemporaryExpr; we now have 3 different places in the code that
  encodes this information; some refactoring is needed to clean that up
- more tests needed

This is still rough, but I wanted to get early feedback about the direction this
is taking.

http://reviews.llvm.org/D4706

Files:
  lib/Analysis/CFG.cpp
  test/Analysis/cfg.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4706.11983.patch
Type: text/x-patch
Size: 10087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140729/58b6ed6b/attachment.bin>


More information about the cfe-commits mailing list