diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-02-14 08:09:34 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-02-14 08:09:34 +0000 |
| commit | 677a35804fb96a6cae20ab0f683c13026ce59bcf (patch) | |
| tree | e786d1e3fdac0337464d46e687b9d96a59fc6b6a /clang/test/SemaObjC/attr-objc-exception.m | |
| parent | 9844408ad6a9e384e94d3a288718b1ef46a57a93 (diff) | |
| download | bcm5719-llvm-677a35804fb96a6cae20ab0f683c13026ce59bcf.tar.gz bcm5719-llvm-677a35804fb96a6cae20ab0f683c13026ce59bcf.zip | |
add parser and type checking support for attribute((objc_exception)).
We don't have "zero cost" exceptions for ObjC yet, so there is no codegen
support required.
llvm-svn: 64546
Diffstat (limited to 'clang/test/SemaObjC/attr-objc-exception.m')
| -rw-r--r-- | clang/test/SemaObjC/attr-objc-exception.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/attr-objc-exception.m b/clang/test/SemaObjC/attr-objc-exception.m new file mode 100644 index 00000000000..12d0b31ce83 --- /dev/null +++ b/clang/test/SemaObjC/attr-objc-exception.m @@ -0,0 +1,16 @@ +// RUN: clang %s -fsyntax-only -verify + +__attribute__((__objc_exception__)) +@interface NSException { + int x; +} + +@end + + +__attribute__((__objc_exception__)) // expected-error {{attribute may only be applied to an Objective-C interface}} +int X; + +__attribute__((__objc_exception__)) // expected-error {{attribute may only be applied to an Objective-C interface}} +void foo(); + |

