https://github.com/mizvekov approved this pull request.

LGTM, Thanks!

> I added several tests with dead branches. I noticed that Clang missed NRVO 
> opportunity in create_object5 test. I wonder if it is a know issue or not. 
> GCC seems to handle it.

Yeah I think so, the current NRVO algorithm itself is extremely naive, and on 
top of that we don't run the NRVO propagation on template instantiation, as 
that depends on Parser infrastructure which is not available anymore after 
parsing.

So as far as clang is concerned, this only considers the initial template 
parse, and at that point all branches are possible.

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

Reply via email to