1 // RUN: %clang_cc1 -verify %s -pedantic-errors
2 // RUN: %clang_cc1 -verify %s -pedantic-errors -DINLINE
3 // RUN: %clang_cc1 -verify %s -pedantic-errors -DSTATIC
4 // RUN: %clang_cc1 -verify %s -pedantic-errors -std=c++11 -DCONSTEXPR
5 // RUN: %clang_cc1 -verify %s -std=c++11 -DDELETED
8 inline // expected-error {{'main' is not allowed to be declared inline}}
10 static // expected-error {{'main' is not allowed to be declared static}}
12 constexpr // expected-error {{'main' is not allowed to be declared constexpr}}
14 int main(int argc
, char **argv
)
16 = delete; // expected-error {{'main' is not allowed to be deleted}}
19 int (*pmain
)(int, char**) = &main
; // expected-error {{ISO C++ does not allow 'main' to be used by a program}}
22 main(0, 0); // expected-error {{ISO C++ does not allow 'main' to be used by a program}}