[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CXX / except / except.spec / p11.cpp
blobb7b9fcb23144b08be6bee39ed10466cea9e90aba
1 // RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
3 // This is the "let the user shoot themselves in the foot" clause.
4 void f() noexcept { // expected-note {{function declared non-throwing here}}
5 throw 0; // expected-warning {{has a non-throwing exception specification but}}
7 void g() throw() { // expected-note {{function declared non-throwing here}}
8 throw 0; // expected-warning {{has a non-throwing exception specification but}}
10 void h() throw(int) {
11 throw 0.0; // no-error