diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-24 04:20:31 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-24 04:20:31 +0000 |
| commit | e68a38f0a8abcd86da39917f035d69f1c8c12a62 (patch) | |
| tree | 3fc7d24667e533ad843bfd7499755619ae7d00bd /clang/test | |
| parent | 792c22dbd477c26955e86577d7e49f981060c644 (diff) | |
| download | bcm5719-llvm-e68a38f0a8abcd86da39917f035d69f1c8c12a62.tar.gz bcm5719-llvm-e68a38f0a8abcd86da39917f035d69f1c8c12a62.zip | |
Fix crash if substitution fails during deduction of variable template partial specialization arguments.
llvm-svn: 290484
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaTemplate/deduction.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/test/SemaTemplate/deduction.cpp b/clang/test/SemaTemplate/deduction.cpp index 8cd4331755a..9471bac91c3 100644 --- a/clang/test/SemaTemplate/deduction.cpp +++ b/clang/test/SemaTemplate/deduction.cpp @@ -338,16 +338,13 @@ namespace member_pointer { } namespace deduction_substitution_failure { - template<typename T> struct Fail { typedef typename T::error error; }; // expected-error {{prior to '::'}} + template<typename T> struct Fail { typedef typename T::error error; }; // expected-error 2{{prior to '::'}} template<typename T, typename U> struct A {}; template<typename T> struct A<T, typename Fail<T>::error> {}; // expected-note {{instantiation of}} A<int, int> ai; // expected-note {{during template argument deduction for class template partial specialization 'A<T, typename Fail<T>::error>' [with T = int]}} - // FIXME: This tickles an assertion. -#if 0 template<typename T, typename U> int B; // expected-warning 0-1 {{extension}} - template<typename T> int B<T, typename Fail<T>::error> {}; - int bi = B<char, char>; -#endif + template<typename T> int B<T, typename Fail<T>::error> {}; // expected-note {{instantiation of}} + int bi = B<char, char>; // expected-note {{during template argument deduction for variable template partial specialization 'B<T, typename Fail<T>::error>' [with T = char]}} } |

