diff options
Diffstat (limited to 'test/SemaCXX/exception-spec.cpp')
-rw-r--r-- | test/SemaCXX/exception-spec.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/exception-spec.cpp b/test/SemaCXX/exception-spec.cpp new file mode 100644 index 0000000..f301a63 --- /dev/null +++ b/test/SemaCXX/exception-spec.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -fcxx-exceptions -std=c++11 %s + +namespace MissingOnTemplate { + template<typename T> void foo(T) noexcept(true); // expected-note {{previous}} + template<typename T> void foo(T); // expected-error {{missing exception specification 'noexcept(true)'}} + void test() { foo(0); } +} |