brintos

brintos / llvm-project-archived public Read only

0
0
Text · 931 B · be7435a Raw
30 lines · cpp
1// RUN: %clang_cc1 -verify -std=c++98 -Wextra-semi %s2// RUN: %clang_cc1 -verify -std=c++03 -Wextra-semi %s3// RUN: %clang_cc1 -verify -std=c++11 -Wextra-semi %s4// RUN: %clang_cc1 -verify -std=c++17 -Wextra-semi %s5// RUN: %clang_cc1 -verify -std=c++2a -Wextra-semi %s6// RUN: %clang_cc1 -verify -Weverything -Wno-c++98-compat %s7// RUN: %clang_cc1 -verify -Weverything -Wno-c++98-compat-pedantic -Wc++98-compat-extra-semi %s8 9// Last RUN line checks that c++98-compat-extra-semi can still be re-enabled.10 11void F();12 13void F(){}14;15#if __cplusplus < 201103L16// expected-warning@-2{{extra ';' outside of a function is a C++11 extension}}17#else18// expected-warning@-4{{extra ';' outside of a function is incompatible with C++98}}19#endif20 21namespace ns {22class C {23  void F() const;24};25}26; // expected-warning {{extra ';' outside of a function is}}27 28void ns::C::F() const {}29; // expected-warning {{extra ';' outside of a function is}}30