p11.cpp revision 9351b031c445a6bc37a8cfa7ab84fb6dfe55ae3a
18d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt// RUN: %clang_cc1 -std=c++0x -fexceptions -fcxx-exceptions -fsyntax-only -verify %s 28d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 38d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt// This is the "let the user shoot himself in the foot" clause. 48d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid f() noexcept { 58d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt throw 0; // no-error 68d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt} 78d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid g() throw() { 88d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt throw 0; // no-error 98d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt} 108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid h() throw(int) { 118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt throw 0.0; // no-error 128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt} 138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt