[clang] [clang] Restrict -Wnrvo to C++ code only. (PR #157059)

via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 5 06:13:42 PDT 2025


================
@@ -223,6 +223,7 @@ Deprecated Compiler Flags
 Modified Compiler Flags
 -----------------------
 - The `-gkey-instructions` compiler flag is now enabled by default when DWARF is emitted for plain C/C++ and optimizations are enabled. (#GH149509)
+- The `-Wnrvo` compiler flag will not apply for C language.
----------------
Sirraide wrote:

```suggestion
- ``-Wnrvo`` is now ignored in C mode.
```
Maybe something like this? Also, I’d move this into the ‘Improvement to Clang’s Diagnostics’ section below.

(wrt the double backticks, yes, the release note above this one is also wrong)

https://github.com/llvm/llvm-project/pull/157059


More information about the cfe-commits mailing list