diff options
Diffstat (limited to 'clang/test/SemaTemplate/instantiation-depth.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiation-depth.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/test/SemaTemplate/instantiation-depth.cpp b/clang/test/SemaTemplate/instantiation-depth.cpp index c0b8bb2a124..17f84c170c3 100644 --- a/clang/test/SemaTemplate/instantiation-depth.cpp +++ b/clang/test/SemaTemplate/instantiation-depth.cpp @@ -19,13 +19,12 @@ void test() { // RUN: %clang_cc1 -fsyntax-only -verify -ftemplate-depth 5 -ftemplate-backtrace-limit 4 -std=c++11 -DNOEXCEPT %s template<typename T> struct S { - S() noexcept(noexcept(T())); -}; -struct T : S<T> {}; \ + S() noexcept(noexcept(S<S>())); \ // expected-error{{recursive template instantiation exceeded maximum depth of 5}} \ -// expected-note 4 {{in instantiation of exception spec}} \ +// expected-note 3 {{in instantiation of exception spec}} \ // expected-note {{skipping 2 contexts in backtrace}} \ // expected-note {{use -ftemplate-depth=N to increase recursive template instantiation depth}} -T t; // expected-note {{implicit default constructor for 'T' first required here}} +}; +S<void> t; // expected-note {{in instantiation of exception spec}} #endif |