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 | 6d12af7410a8fec24b9522875ef8ceb385c78d56 (patch) | |
tree | 2aade1c2ad8bd1edefc181733df1786027865e38 /clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp | |
parent | 493dffe2b12a0f9c61d700f23541c2a53fcedafe (diff) | |
download | bcm5719-llvm-6d12af7410a8fec24b9522875ef8ceb385c78d56.tar.gz bcm5719-llvm-6d12af7410a8fec24b9522875ef8ceb385c78d56.zip |
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.
llvm-svn: 164437
Diffstat (limited to 'clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp b/clang/test/SemaTemplate/instantiation-depth-exception-spec.cpp new file mode 100644 index 00000000000..6caa4a60e6f --- /dev/null +++ b/clang/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}} +} |