14 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s2 3template<class>4concept fooable = true;5 6struct S {7 template<class> friend concept x = requires { requires true; }; // expected-error {{friend declaration cannot be a concept}}8 template<class> friend concept fooable; // expected-error {{friend declaration cannot be a concept}}9 template<class> concept friend fooable; // expected-error {{expected unqualified-id}}10 friend concept fooable; // expected-error {{friend declaration cannot be a concept}}11 concept friend fooable; // expected-error {{friend declaration cannot be a concept}}12 concept fooable; // expected-error {{concept declarations may only appear in global or namespace scope}}13};14