llvm-project/clang/test/SemaCXX/injected-class-name-crash.cpp
Richard Smith 0c42539df3 Improve error recovery from missing '>' in template argument list.
Produce the conventional "to match this '<'" note, so that the user
knows why we expected a '>', and properly handle '>>' in C++11 onwards.
2020-03-27 18:59:01 -07:00

12 lines
366 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
template <class T>
struct X : public Foo<Bar { // expected-error {{unknown template name 'Foo'}} expected-error {{use of undeclared identifier 'Bar'}} expected-note {{to match this '<'}}
X();
}; // expected-error {{expected '>'}} expected-error {{expected '{' after base class list}}
template <class T>
X<T>::X() {
}