Debian Codegraph @

clang/test/SemaCXX/crash-GH173943.cpp

raw
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++03 %s
3
4 // https://github.com/llvm/llvm-project/issues/173943
5
6 constexpr void f(this auto& self) // expected-note {{candidate function}}
7 // expected-error@-1 {{unknown type name 'constexpr'}}
8 // expected-error@-2 {{'auto' not allowed in function prototype}}
9 // expected-error@-3 {{explicit object parameters are incompatible with C++ standards before C++2b}}
10 // expected-error@-4 {{expected ';' after top level declarator}}
11 // expected-error@-5 {{an explicit object parameter cannot appear in a non-member function}}
12 // expected-warning@-6 {{'auto' type specifier is a C++11 extension}}
13
14 void g() {
15 f(); // expected-error {{no matching function for call to 'f'}}
16 }