From: Sebastian Redl Date: Mon, 14 Mar 2011 18:51:44 +0000 (+0000) Subject: Add another, pretty trivial, exception spec test case. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9351b031c445a6bc37a8cfa7ab84fb6dfe55ae3a;p=clang Add another, pretty trivial, exception spec test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127602 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/except/except.spec/p11.cpp b/test/CXX/except/except.spec/p11.cpp new file mode 100644 index 0000000000..268b53ad79 --- /dev/null +++ b/test/CXX/except/except.spec/p11.cpp @@ -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 +}