Javier =?utf-8?q?Mu=C3=B1oz?= Kirschberg
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -0,0 +1,41 @@
+// RUN: %clang -std=c23 -Wnrvo -Xclang -verify %s
+// expected-no-diagnostics
+
+#include <stdlib.h>
----------------
zmodem wrote:
I don't think we should include `<stdlib.h>` (there may not be one).
Also I don't think you need it if you simplify the test. For example:
```
struct s { int x; };
struct s foo(int x) {
struct s a = { 1 }, b = { 2 };
if (x == 0)
return a; // -Wnrvo
return b;
}
```
https://github.com/llvm/llvm-project/pull/157059
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits