// RUN: %clang_cc1 -std=c++2a -verify %s template class A { virtual void f1() requires (sizeof(T) == 0); // expected-error@-1{{virtual function cannot have a requires clause}} virtual void f2() requires (sizeof(T) == 1); // expected-error@-1{{virtual function cannot have a requires clause}} }; template class B : A { virtual void f1() requires (sizeof(T) == 0) override {} // expected-error@-1{{virtual function cannot have a requires clause}} }; template struct C : T {void f() requires true; }; // expected-error@-1{{virtual function cannot have a requires clause}} struct D { virtual void f(); }; template struct C; // expected-note@-1{{in instantiation of template class 'C' requested here}}