r290587 - Add reference/non-reference mismatch test.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 26 22:18:22 PST 2016
Author: rsmith
Date: Tue Dec 27 00:18:22 2016
New Revision: 290587
URL: http://llvm.org/viewvc/llvm-project?rev=290587&view=rev
Log:
Add reference/non-reference mismatch test.
Modified:
cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp
Modified: cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp?rev=290587&r1=290586&r2=290587&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp (original)
+++ cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp Tue Dec 27 00:18:22 2016
@@ -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<int, int &R> struct B; // expected-note {{template}}
template<const int &R> struct B<0, R> {};
@@ -398,4 +398,9 @@ namespace partial_order_references {
template<int, const int &R> struct C; // expected-note {{template}}
template<int &R> struct C<0, R> {};
C<0, N> c; // expected-error {{undefined}}
+
+ template<int, const int &R> struct D; // expected-note {{template}}
+ template<int N> struct D<0, N> {};
+ extern const int K = 5;
+ D<0, K> d; // expected-error {{undefined}}
}
More information about the cfe-commits
mailing list