// RUN: %clang_cc1 -std=c++2a -verify %s
template<typename T>classA{virtualvoidf1()requires(sizeof(T)==0);// expected-error@-1{{virtual function cannot have a requires clause}}
virtualvoidf2()requires(sizeof(T)==1);// expected-error@-1{{virtual function cannot have a requires clause}}
};template<typename T>classB:A<T>{virtualvoidf1()requires(sizeof(T)==0) override {}// expected-error@-1{{virtual function cannot have a requires clause}}
};template<typename T>structC:T{voidf() requires true;};// expected-error@-1{{virtual function cannot have a requires clause}}
structD{virtualvoidf();};templatestruct C<D>;// expected-note@-1{{in instantiation of template class 'C<D>' requested here}}