From 2f25e95e52816cc143f17decb41eaef86fd08cc4 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 27 Dec 2016 06:18:22 +0000 Subject: [PATCH] Add reference/non-reference mismatch test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290587 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaTemplate/temp_arg_nontype.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp index 4c63c7eee9..e99c56ba1f 100644 --- a/test/SemaTemplate/temp_arg_nontype.cpp +++ b/test/SemaTemplate/temp_arg_nontype.cpp @@ -389,7 +389,7 @@ namespace partial_order_references { int N; A<0, 0, N> a; - // FIXME: These should both be rejected as they are not more specialized than + // FIXME: These should all be rejected as they are not more specialized than // the primary template (they can never be used due to the type mismatch). template struct B; // expected-note {{template}} template struct B<0, R> {}; @@ -398,4 +398,9 @@ namespace partial_order_references { template struct C; // expected-note {{template}} template struct C<0, R> {}; C<0, N> c; // expected-error {{undefined}} + + template struct D; // expected-note {{template}} + template struct D<0, N> {}; + extern const int K = 5; + D<0, K> d; // expected-error {{undefined}} } -- 2.50.1