mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 19:45:40 -04:00

A TemplateIdAnnotation represents only a template-id, not a nested-name-specifier plus a template-id. Don't make a redundant copy of the CXXScopeSpec and store it on the template-id annotation. This slightly improves error recovery by more properly handling the case where we would form an invalid CXXScopeSpec while parsing a typename specifier, instead of accidentally putting the token stream into a broken "annot_template_id with a scope specifier, but with no preceding annot_cxxscope token" state.
9 lines
468 B
C++
9 lines
468 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
// <rdar://problem/9173693>
|
|
template< bool C > struct assert { };
|
|
template< bool > struct assert_arg_pred_impl { }; // expected-note 2 {{declared here}}
|
|
template< typename Pred > assert<false> assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
|
|
// expected-error@-1 {{did you mean 'assert_arg_pred_impl'}}
|
|
// expected-error@-2 {{template argument for non-type template parameter must be an expression}}
|