From 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 19 Jan 2019 10:04:05 +0000 Subject: Vendor import of clang trunk r351319 (just before the release_80 branch point): https://llvm.org/svn/llvm-project/cfe/trunk@351319 --- test/CXX/temp/temp.param/p2.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/CXX/temp/temp.param/p2.cpp') diff --git a/test/CXX/temp/temp.param/p2.cpp b/test/CXX/temp/temp.param/p2.cpp index 656bd26ff08d1..c70b1d354f7c7 100644 --- a/test/CXX/temp/temp.param/p2.cpp +++ b/test/CXX/temp/temp.param/p2.cpp @@ -8,14 +8,17 @@ template struct X; template struct X; -// typename followed by aqualified-id denotes the type in a non-type +// typename followed by a qualified-id denotes the type in a non-type // parameter-declaration. template struct Y0; template::type Value> struct Y1; +template struct Y2; // expected-error{{expected ',' or '>'}} +template struct Y3; // expected-error{{expected a qualified name after 'typename'}} expected-error{{expected ',' or '>'}} +template struct Y4; // expected-error{{expected template parameter}} expected-note {{did you mean to use 'typename'?}} expected-error{{expected ',' or '>'}} // A storage class shall not be specified in a template-parameter declaration. template struct Z; //expected-error{{invalid declaration specifier}} -template struct Z0; //expected-error{{expected template parameter}} expected-error{{expected identifier}} expected-error{{extraneous 'template<>' in declaration of struct 'Z0'}} expected-note{{did you mean to use 'typename'?}} +template struct Z0; //expected-error{{invalid declaration specifier}} template struct Z1; //expected-error2{{invalid declaration specifier}} template struct Z2; //expected-error{{invalid declaration specifier}} template struct Z3; //expected-error{{invalid declaration specifier}} @@ -43,6 +46,6 @@ template struct Z13; // OK // Make sure that we properly disambiguate non-type template parameters that // start with 'class'. class X1 { }; -template struct Y2 { }; +template struct X2 { }; // FIXME: add the example from p2 -- cgit v1.3