p11.cpp 318 B

12345678910111213
  1. // RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
  2. // expected-no-diagnostics
  3. // This is the "let the user shoot themselves in the foot" clause.
  4. void f() noexcept {
  5. throw 0; // no-error
  6. }
  7. void g() throw() {
  8. throw 0; // no-error
  9. }
  10. void h() throw(int) {
  11. throw 0.0; // no-error
  12. }