[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 16 08:22:18 PDT 2024
================
@@ -122,6 +119,26 @@ namespace ns2 {
extern "C++" void main() {} // ok
}
+#elif TEST14
+extern "C" {
+ int main(); // expected-warning {{'main' should not be 'extern "C"'}}
+}
+
+extern "C" int main(); // expected-warning {{'main' should not be 'extern "C"'}}
+
+#elif TEST15
+extern "C" __attribute__((visibility("default"))) __attribute__((weak))
----------------
a-tarasyuk wrote:
I've updated test, thanks
https://github.com/llvm/llvm-project/pull/104594
More information about the cfe-commits
mailing list