================
@@ -0,0 +1,56 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s
-verify
+
+export void f1();
+
+export void f1() {}
+
+namespace { // expected-note {{anonymous namespace begins here}}
+ export void f2(); // expected-error {{export declaration appears within
anonymous namespace}}
+}
+
+export void f3();
+
+export { // expected-note {{export block begins here}}
+ void f4() {}
+ export void f5() {} // expected-error {{export declaration appears within
another export declaration}}
----------------
damyanp wrote:
What's the rationale for prohibiting nested exports?
I notice that C++ allows nested `extern 'C'`s, for example.
https://github.com/llvm/llvm-project/pull/96823
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits