diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-23 11:10:26 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-23 11:10:26 +0000 |
commit | 2fce988e86bc01829142e4362d4eff1af0925147 (patch) | |
tree | c69d3f4f13d508570bb5257a6aea735f88bdf09c /test/SemaObjC/method-unused-attribute.m | |
parent | a3fa5c7f1b5e2ba4d6ec033dc0e2376326b05824 (diff) | |
download | FreeBSD-src-2fce988e86bc01829142e4362d4eff1af0925147.zip FreeBSD-src-2fce988e86bc01829142e4362d4eff1af0925147.tar.gz |
Update clang to r94309.
Diffstat (limited to 'test/SemaObjC/method-unused-attribute.m')
-rw-r--r-- | test/SemaObjC/method-unused-attribute.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaObjC/method-unused-attribute.m b/test/SemaObjC/method-unused-attribute.m new file mode 100644 index 0000000..a4e5321 --- /dev/null +++ b/test/SemaObjC/method-unused-attribute.m @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -verify %s + +@interface INTF +- (void) correct_use_of_unused: (void *) notice : (id)another_arg; +- (void) will_warn_unused_arg: (void *) notice : (id)warn_unused; +- (void) unused_attr_on_decl_ignored: (void *) __attribute__((unused)) will_warn; +@end + +@implementation INTF +- (void) correct_use_of_unused: (void *) __attribute__((unused)) notice : (id) __attribute__((unused)) newarg{ +} +- (void) will_warn_unused_arg: (void *) __attribute__((unused)) notice : (id)warn_unused {} // expected-warning {{unused parameter 'warn_unused'}} +- (void) unused_attr_on_decl_ignored: (void *) will_warn{} // expected-warning {{unused parameter 'will_warn'}} +@end + |