brintos

brintos / llvm-project-archived public Read only

0
0
Text · 955 B · 7c7d49d Raw
17 lines · cpp
1// RUN: %clang_cc1 -Eonly -std=c17 -pedantic -verify=c17,expected -x c %s2// RUN: %clang_cc1 -Eonly -std=c23 -pedantic -Wpre-c23-compat -verify=c23,expected -x c %s3// RUN: %clang_cc1 -Eonly -std=c++17 -pedantic -verify=cxx17,expected %s4// RUN: %clang_cc1 -Eonly -std=c++20 -pedantic -Wpre-c++20-compat -verify=cxx20,expected %s5 6// silent-no-diagnostics7 8#define FOO(x, ...) // expected-note  {{macro 'FOO' defined here}}9 10int main() {11  FOO(42) // c17-warning {{passing no argument for the '...' parameter of a variadic macro is a C23 extension}} \12          // cxx17-warning {{passing no argument for the '...' parameter of a variadic macro is a C++20 extension}} \13          // c23-warning {{passing no argument for the '...' parameter of a variadic macro is incompatible with C standards before C23}} \14          // cxx20-warning {{passing no argument for the '...' parameter of a variadic macro is incompatible with C++ standards before C++20}}15}16 17