zygoloid wrote:

I think `__attribute__((cleanup))` on a variable should disable NRVO on that 
variable, in both C and in C++. [GCC's 
behavior](https://godbolt.org/z/Psbbr83ET) is to ignore the `cleanup` attribute 
entirely if NRVO is applied to the variable, which seems like a flawed 
approach, but performing NRVO and doing something different also seems 
problematic, as demonstrated in #100868. Given that, I think that #100868 and 
#100902 should probably be handled independently.

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

Reply via email to