From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- test/SemaObjC/no-objc-exceptions.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/SemaObjC/no-objc-exceptions.m (limited to 'test/SemaObjC/no-objc-exceptions.m') diff --git a/test/SemaObjC/no-objc-exceptions.m b/test/SemaObjC/no-objc-exceptions.m new file mode 100644 index 0000000..78419a2 --- /dev/null +++ b/test/SemaObjC/no-objc-exceptions.m @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fno-objc-exceptions -fsyntax-only -verify %s + +void f() { + @throw @"Hello"; // expected-error {{cannot use '@throw' with Objective-C exceptions disabled}} +} + +void g() { + @try { // expected-error {{cannot use '@try' with Objective-C exceptions disabled}} + f(); + } @finally { + + } +} -- cgit v1.1