Delete unused PoisonChecking utility pass
[llvm-project.git] / clang / test / CXX / over / over.oper / p7.cpp
blob9d1201a103426567a75121561b1cda0b9e3d52e0
1 // RUN: %clang_cc1 -std=c++11 %s -verify=expected,cxx11
2 // RUN: %clang_cc1 -std=c++23 %s -verify=expected,cxx23
3 // RUN: %clang_cc1 -std=c++23 -Wpre-c++23-compat %s -verify=expected,precxx23
6 struct Functor {
7 static int operator()(int a, int b);
8 static int operator[](int a1);
9 // cxx11-warning@-2 {{declaring overloaded 'operator()' as 'static' is a C++23 extension}}
10 // cxx11-warning@-2 {{declaring overloaded 'operator[]' as 'static' is a C++23 extension}}
11 // precxx23-warning@-4 {{incompatible with C++ standards before C++23}}
12 // precxx23-warning@-4 {{incompatible with C++ standards before C++23}}
15 struct InvalidParsing1 {
16 extern int operator()(int a, int b); // expected-error {{storage class specified}}
17 extern int operator[](int a1); // expected-error {{storage class specified}}
20 struct InvalidParsing2 {
21 extern static int operator()(int a, int b); // expected-error {{storage class specified}} // expected-error {{cannot combine with previous 'extern' declaration specifier}}
22 extern static int operator[](int a); // expected-error {{storage class specified}} // expected-error {{cannot combine with previous 'extern' declaration specifier}}