xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/method-unused-attribute.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1  -fsyntax-only -Wunused-parameter -verify -Wno-objc-root-class %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc@interface INTF
4*f4a2713aSLionel Sambuc- (void) correct_use_of_unused: (void *) notice : (id)another_arg;
5*f4a2713aSLionel Sambuc- (void) will_warn_unused_arg: (void *) notice : (id)warn_unused;
6*f4a2713aSLionel Sambuc- (void) unused_attr_on_decl_ignored: (void *)  __attribute__((unused)) will_warn;
7*f4a2713aSLionel Sambuc@end
8*f4a2713aSLionel Sambuc
9*f4a2713aSLionel Sambuc@implementation INTF
10*f4a2713aSLionel Sambuc- (void) correct_use_of_unused: (void *)  __attribute__((unused)) notice : (id) __attribute__((unused)) newarg{
11*f4a2713aSLionel Sambuc}
12*f4a2713aSLionel Sambuc- (void) will_warn_unused_arg: (void *) __attribute__((unused))  notice : (id)warn_unused {}  // expected-warning {{unused parameter 'warn_unused'}}
13*f4a2713aSLionel Sambuc- (void) unused_attr_on_decl_ignored: (void *)  will_warn{}  // expected-warning {{unused parameter 'will_warn'}}
14*f4a2713aSLionel Sambuc@end
15*f4a2713aSLionel Sambuc
16