diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-11-25 19:07:40 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-11-25 19:07:40 +0000 |
commit | 17c7957f023f02fc2c88f51f8908c19b52609275 (patch) | |
tree | c654618ff2d38e26916b49614d89fe01f4a4818d /test/SemaTemplate/instantiation-depth-exception-spec.cpp | |
parent | c477790a57f44875b9de2043f2eb47dff2d20133 (diff) |
Diffstat (limited to 'test/SemaTemplate/instantiation-depth-exception-spec.cpp')
-rw-r--r-- | test/SemaTemplate/instantiation-depth-exception-spec.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/SemaTemplate/instantiation-depth-exception-spec.cpp b/test/SemaTemplate/instantiation-depth-exception-spec.cpp index 6caa4a60e6f8..3f64811bd108 100644 --- a/test/SemaTemplate/instantiation-depth-exception-spec.cpp +++ b/test/SemaTemplate/instantiation-depth-exception-spec.cpp @@ -1,11 +1,14 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s -template<typename T> T go(T a) noexcept(noexcept(go(a))); // \ -// expected-error 16{{call to function 'go' that is neither visible}} \ -// expected-note 16{{'go' should be declared prior to the call site}} \ -// expected-error {{recursive template instantiation exceeded maximum depth of 16}} +template<int N> struct X { + static int go(int a) noexcept(noexcept(X<N+1>::go(a))); // \ +// expected-error {{recursive template instantiation exceeded maximum depth of 16}} \ +// expected-note 9{{in instantiation of exception specification}} \ +// expected-note {{skipping 7 context}} \ +// expected-note {{use -ftemplate-depth}} +}; void f() { - int k = go(0); // \ - // expected-note {{in instantiation of exception specification for 'go<int>' requested here}} + int k = X<0>::go(0); // \ + // expected-note {{in instantiation of exception specification for 'go' requested here}} } |