2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -verify -Wno-objc-root-class %s
|
2010-01-20 02:39:17 +08:00
|
|
|
|
2019-05-03 15:19:46 +08:00
|
|
|
// -Wunused-parameter ignores ObjC method parameters that are unused.
|
|
|
|
|
|
|
|
// expected-no-diagnostics
|
|
|
|
|
2010-01-20 02:39:17 +08:00
|
|
|
@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{
|
|
|
|
}
|
2019-05-03 15:19:46 +08:00
|
|
|
- (void) will_warn_unused_arg: (void *) __attribute__((unused)) notice : (id)warn_unused {}
|
|
|
|
- (void) unused_attr_on_decl_ignored: (void *) will_warn{}
|
2010-01-20 02:39:17 +08:00
|
|
|
@end
|
|
|
|
|