diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-27 06:18:22 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-27 06:18:22 +0000 |
| commit | f0071ccd0855065ff7ad6fd1393993bf3bc71486 (patch) | |
| tree | 5873284bc8a322a34219fdf44ed39e95f78cc1e1 | |
| parent | d92eddf02d02c7b16d4f909c88bc730663155aed (diff) | |
| download | bcm5719-llvm-f0071ccd0855065ff7ad6fd1393993bf3bc71486.tar.gz bcm5719-llvm-f0071ccd0855065ff7ad6fd1393993bf3bc71486.zip | |
Add reference/non-reference mismatch test.
llvm-svn: 290587
| -rw-r--r-- | clang/test/SemaTemplate/temp_arg_nontype.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/SemaTemplate/temp_arg_nontype.cpp b/clang/test/SemaTemplate/temp_arg_nontype.cpp index 4c63c7eee9e..e99c56ba1f5 100644 --- a/clang/test/SemaTemplate/temp_arg_nontype.cpp +++ b/clang/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<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}} } |

