diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /test/Parser/cxx-template-decl.cpp | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/Parser/cxx-template-decl.cpp')
-rw-r--r-- | test/Parser/cxx-template-decl.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Parser/cxx-template-decl.cpp b/test/Parser/cxx-template-decl.cpp index 7e931a3..81269ce 100644 --- a/test/Parser/cxx-template-decl.cpp +++ b/test/Parser/cxx-template-decl.cpp @@ -85,6 +85,19 @@ struct shadow5 { int T(int, float); // expected-error{{shadows}} }; +template<typename T, // expected-note{{template parameter is declared here}} + T T> // expected-error{{declaration of 'T' shadows template parameter}} +void shadow6(); + +template<typename T, // expected-note{{template parameter is declared here}} + template<typename> class T> // expected-error{{declaration of 'T' shadows template parameter}} +void shadow7(); + +// PR8302 +template<template<typename> class T> struct shadow8 { // expected-note{{template parameter is declared here}} + template<template<typename> class T> struct inner; // expected-error{{declaration of 'T' shadows template parameter}} +}; + // Non-type template parameters in scope template<int Size> void f(int& i) { @@ -103,6 +116,7 @@ void f2() { // PR3844 template <> struct S<int> { }; // expected-error{{explicit specialization of non-template struct 'S'}} +template <> union U<int> { }; // expected-error{{explicit specialization of non-template union 'U'}} namespace PR6184 { namespace N { |