================
@@ -61,6 +64,64 @@ int q(void)
// expected-no-diagnostics
int main;
+#elif TEST11
+extern "C" {
+ namespace Y {
+ int main; // expected-error {{main cannot be declared as global variable}}
----------------
MitalAshok wrote:
These diagnostics could be similar to:
https://github.com/llvm/llvm-project/blob/150bf637baad2ba4df6369600b65d897ed9b31a7/clang/include/clang/Basic/DiagnosticSemaKinds.td#L6083-L6087
So `main cannot be declared as a variable %select{in the global scope|with C
language linkage}0`.
https://github.com/llvm/llvm-project/pull/101853
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits