================
@@ -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}}
----------------
hekota wrote:

Each export creates a new ExportDecl node in the AST three and limiting it to 
just one make it cleaner. I am not aware of any specific reason other than 
maybe this and to keep the syntax and parsing code identical to C++ modules 
export.

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

Reply via email to