]> granicus.if.org Git - clang/commitdiff
Add another, pretty trivial, exception spec test case.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Mon, 14 Mar 2011 18:51:44 +0000 (18:51 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Mon, 14 Mar 2011 18:51:44 +0000 (18:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127602 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/except/except.spec/p11.cpp [new file with mode: 0644]

diff --git a/test/CXX/except/except.spec/p11.cpp b/test/CXX/except/except.spec/p11.cpp
new file mode 100644 (file)
index 0000000..268b53a
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -std=c++0x -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
+
+// This is the "let the user shoot himself in the foot" clause.
+void f() noexcept {
+  throw 0; // no-error
+}
+void g() throw() {
+  throw 0; // no-error
+}
+void h() throw(int) {
+  throw 0.0; // no-error
+}