annotate clang/test/SemaObjC/method-unused-attribute.m @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -verify -Wno-objc-root-class %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // -Wunused-parameter ignores ObjC method parameters that are unused.
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 // expected-no-diagnostics
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 @interface INTF
anatofuz
parents:
diff changeset
8 - (void) correct_use_of_unused: (void *) notice : (id)another_arg;
anatofuz
parents:
diff changeset
9 - (void) will_warn_unused_arg: (void *) notice : (id)warn_unused;
anatofuz
parents:
diff changeset
10 - (void) unused_attr_on_decl_ignored: (void *) __attribute__((unused)) will_warn;
anatofuz
parents:
diff changeset
11 @end
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 @implementation INTF
anatofuz
parents:
diff changeset
14 - (void) correct_use_of_unused: (void *) __attribute__((unused)) notice : (id) __attribute__((unused)) newarg{
anatofuz
parents:
diff changeset
15 }
anatofuz
parents:
diff changeset
16 - (void) will_warn_unused_arg: (void *) __attribute__((unused)) notice : (id)warn_unused {}
anatofuz
parents:
diff changeset
17 - (void) unused_attr_on_decl_ignored: (void *) will_warn{}
anatofuz
parents:
diff changeset
18 @end
anatofuz
parents:
diff changeset
19