martinboehme wrote:

> I have a high-level question not directly related to the patch. We have 
> probably even talked about it at a conference a few years ago but I don't 
> remember 😅

I don't recall -- maybe you talked to someone else?

> > `ResultObjectVisitor`
> 
> I briefly looked at the implementation and I suspect that you folks might be 
> reinventing 
> [`ConstructionContext`](https://clang.llvm.org/doxygen/classclang_1_1ConstructionContext.html)
>  which is typically¹ already available in the CFG. (Under an off-by-default 
> CFG build option.) (I'm in favor of turning it on by default.) (Together with 
> a few other options that improve precision, eg. copy elision and RVO support.)
> 
> __ ¹ Not all of the 30+ possible construction contexts are currently 
> implemented. But your visitor doesn't seem to implement them either.

Thanks for the info -- I wasn't aware of `ConstructionContext`. Will take a 
look. Can you point me to some examples of how this is used?

Agree that we should use `ConstructionContext` in favor of 
`ResultObjectVisitor` if feasible.

https://github.com/llvm/llvm-project/pull/99616
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to