diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-08 22:45:21 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-08 22:45:21 +0000 |
commit | 64f15d6d009732951aa9c549c52fa67a03ae13b7 (patch) | |
tree | 89e1a9d06a72131ef09b4574a1db5cc4c5ff48b7 /test/SemaTemplate/deduction.cpp | |
parent | d9fddb6063f32c177fd6c555b978d4ea79462ded (diff) | |
download | clang-64f15d6d009732951aa9c549c52fa67a03ae13b7.tar.gz |
PR31514: Add recursive self-instantiation check during template argument
deduction in partial ordering.
This prevents us from crashing due to attempting to instantiate the same class
template specialization definition multiple times. (Debug builds also appear to
sometimes hit the stack limit before hitting the instantiation depth limit in
this case.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r-- | test/SemaTemplate/deduction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp index 2275a8b3b7..c25bf68b06 100644 --- a/test/SemaTemplate/deduction.cpp +++ b/test/SemaTemplate/deduction.cpp @@ -342,7 +342,7 @@ namespace deduction_substitution_failure { 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]}} + A<int, int> ai; // expected-note {{during template argument deduction for class template partial specialization 'A<T, typename Fail<T>::error>' [with T = int]}} expected-note {{in instantiation of template class 'deduction_substitution_failure::A<int, int>'}} template<typename T, typename U> int B; // expected-warning 0-1 {{extension}} template<typename T> int B<T, typename Fail<T>::error> {}; // expected-note {{instantiation of}} |