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.

  rC Clang

cfe-commits mailing list

Reply via email to