https://github.com/Sirraide commented:
I think it makes sense not to issue the warning considering that C doesn’t have a concept of NRVO from what I know. That said, I don’t think the current approach is right because it just prevents NRVO in C entirely; we still want to perform NRVO, we just don’t want to warn if we can’t. What I think we should do instead is the same thing that GCC does, i.e. reject the flag in the driver if we’re compiling C. https://github.com/llvm/llvm-project/pull/157059 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits