diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2019-05-14 21:58:59 +0000 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2019-05-14 21:58:59 +0000 |
commit | b35a2aa71f76a334a9c98c0a3c3995b5d902d2b9 (patch) | |
tree | cdff4a5d1a715d4ad622fd8f190128b54bebe440 /test/SemaObjC/method-unused-attribute.m | |
parent | 3748d41833787fcbf59cc5624e8d2b042a8991bc (diff) | |
parent | 741e05796da92b46d4f7bcbee00702ff37df6489 (diff) |
Creating branches/google/stable and tags/google/stable/2019-05-14 from r360103upstream/google/stable
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/google/stable@360714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/method-unused-attribute.m')
-rw-r--r-- | test/SemaObjC/method-unused-attribute.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/SemaObjC/method-unused-attribute.m b/test/SemaObjC/method-unused-attribute.m index d604c3975c..d8e9659b51 100644 --- a/test/SemaObjC/method-unused-attribute.m +++ b/test/SemaObjC/method-unused-attribute.m @@ -1,5 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -verify -Wno-objc-root-class %s +// -Wunused-parameter ignores ObjC method parameters that are unused. + +// expected-no-diagnostics + @interface INTF - (void) correct_use_of_unused: (void *) notice : (id)another_arg; - (void) will_warn_unused_arg: (void *) notice : (id)warn_unused; @@ -9,7 +13,7 @@ @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'}} +- (void) will_warn_unused_arg: (void *) __attribute__((unused)) notice : (id)warn_unused {} +- (void) unused_attr_on_decl_ignored: (void *) will_warn{} @end |