summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-template-decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/cxx-template-decl.cpp')
-rw-r--r--clang/test/Parser/cxx-template-decl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-template-decl.cpp b/clang/test/Parser/cxx-template-decl.cpp
index 07316782a83..cb8a93fdecb 100644
--- a/clang/test/Parser/cxx-template-decl.cpp
+++ b/clang/test/Parser/cxx-template-decl.cpp
@@ -261,3 +261,11 @@ namespace PR42071 {
template<int Q::N> struct C; // expected-error {{parameter declarator cannot be qualified}}
template<int f(int a = 0)> struct D; // expected-error {{default arguments can only be specified for parameters in a function declaration}}
}
+
+namespace AnnotateAfterInvalidTemplateId {
+ template<int I, int J> struct A { };
+ template<int J> struct A<0, J> { }; // expected-note {{J = 0}}
+ template<int I> struct A<I, 0> { }; // expected-note {{I = 0}}
+
+ void f() { A<0, 0>::f(); } // expected-error {{ambiguous partial specializations}}
+}
OpenPOWER on IntegriCloud