[PATCH] D43477: [CFG] [analyzer] Add MaterializeTemporaryExpr into the construction context.

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


NoQ added a comment.

> eg. `const C &c(123);` or the actual (not the elidable copy) constructor in `C foo() { return C(123); }`

Emm, sry, never mind, forget it, i was trying to say that the reason why we don't have a `CXXBindTemporary` is because we don't have a destructor in class `C`, not because we have specific syntax patterns.

This fix does not cause changes in the analyzer yet. Even though we are providing construction contexts in a bit more cases, and even if we used them in the analyzer, we wouldn't get any functional change yet, because temporary constructors that require no destructors are inlined anyway, regardless of construction context, and an exact same temporary region is accidentally created for them. So the point of this patch is not to make more construction contexts available, but to provide better construction contexts in the `CXXBindTemporary` case, which will be used later.


Repository:
  rC Clang

https://reviews.llvm.org/D43477





More information about the cfe-commits mailing list