When we are missing the ',' or '>' to terminate a template parameter
list, complain about it! Fixes PR7053. llvm-svn: 116551
This commit is contained in:
parent
6db2837f7f
commit
b048402073
|
@ -337,7 +337,7 @@ Parser::ParseTemplateParameterList(unsigned Depth,
|
||||||
// subsumed by whatever goes on in ParseTemplateParameter.
|
// subsumed by whatever goes on in ParseTemplateParameter.
|
||||||
// TODO: This could match >>, and it would be nice to avoid those
|
// TODO: This could match >>, and it would be nice to avoid those
|
||||||
// silly errors with template <vec<T>>.
|
// silly errors with template <vec<T>>.
|
||||||
// Diag(Tok.getLocation(), diag::err_expected_comma_greater);
|
Diag(Tok.getLocation(), diag::err_expected_comma_greater);
|
||||||
SkipUntil(tok::greater, true, true);
|
SkipUntil(tok::greater, true, true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,9 @@ template x; // expected-error {{C++ requires a type specifier for al
|
||||||
// expected-error {{does not refer}}
|
// expected-error {{does not refer}}
|
||||||
export template x; // expected-error {{expected '<' after 'template'}}
|
export template x; // expected-error {{expected '<' after 'template'}}
|
||||||
export template<class T> class x0; // expected-warning {{exported templates are unsupported}}
|
export template<class T> class x0; // expected-warning {{exported templates are unsupported}}
|
||||||
template < ; // expected-error {{parse error}} expected-warning {{declaration does not declare anything}}
|
template < ; // expected-error {{parse error}} \
|
||||||
|
// expected-error{{expected ',' or '>' in template-parameter-list}} \
|
||||||
|
// expected-warning {{declaration does not declare anything}}
|
||||||
template <template X> struct Err1; // expected-error {{expected '<' after 'template'}} \
|
template <template X> struct Err1; // expected-error {{expected '<' after 'template'}} \
|
||||||
// expected-error{{extraneous}}
|
// expected-error{{extraneous}}
|
||||||
template <template <typename> > struct Err2; // expected-error {{expected 'class' before '>'}} \
|
template <template <typename> > struct Err2; // expected-error {{expected 'class' before '>'}} \
|
||||||
|
|
Loading…
Reference in New Issue