1 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST1
2 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST2
3 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST3
4 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST4
5 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST5
6 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST6
7 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST7
8 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST8
9 // RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST9 -ffreestanding
12 int main
; // expected-warning{{variable named 'main' with external linkage has undefined behavior}}
15 extern int main
; // expected-warning{{variable named 'main' with external linkage has undefined behavior}}
18 // expected-no-diagnostics
25 extern int main
; // expected-warning{{variable named 'main' with external linkage has undefined behavior}}
29 // expected-no-diagnostics
35 // expected-no-diagnostics
39 // expected-no-diagnostics
45 // expected-no-diagnostics
51 // expected-no-diagnostics