diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-22 00:53:56 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-22 00:53:56 +0000 |
commit | 5d99a252c63a7745bcd71231ca5240d2a65e4f1d (patch) | |
tree | d269bdf7cf546130a033bb63d388179378996606 /test/SemaTemplate/instantiation-depth-exception-spec.cpp | |
parent | 3d442196134d18ed8ee17576638b758362b60742 (diff) |
Fix bug which sometimes resulted in further diagnostics being produced after a
fatal error. Previously, if a fatal error was followed by a diagnostic which
was suppressed due to a SFINAETrap, we'd forget that we'd seen a fatal error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiation-depth-exception-spec.cpp')
-rw-r--r-- | test/SemaTemplate/instantiation-depth-exception-spec.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiation-depth-exception-spec.cpp b/test/SemaTemplate/instantiation-depth-exception-spec.cpp new file mode 100644 index 0000000000..6caa4a60e6 --- /dev/null +++ b/test/SemaTemplate/instantiation-depth-exception-spec.cpp @@ -0,0 +1,11 @@ +// 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}} + +void f() { + int k = go(0); // \ + // expected-note {{in instantiation of exception specification for 'go<int>' requested here}} +} |