xref: /aosp_15_r20/external/clang/test/CXX/except/except.spec/p11.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
2*67e74705SXin Li // expected-no-diagnostics
3*67e74705SXin Li 
4*67e74705SXin Li // This is the "let the user shoot themselves in the foot" clause.
f()5*67e74705SXin Li void f() noexcept {
6*67e74705SXin Li   throw 0; // no-error
7*67e74705SXin Li }
g()8*67e74705SXin Li void g() throw() {
9*67e74705SXin Li   throw 0; // no-error
10*67e74705SXin Li }
h()11*67e74705SXin Li void h() throw(int) {
12*67e74705SXin Li   throw 0.0; // no-error
13*67e74705SXin Li }
14