[cfe-commits] r93887 - /cfe/trunk/test/SemaObjC/method-unused-attribute.m

Fariborz Jahanian fjahanian at apple.com
Tue Jan 19 10:39:17 PST 2010


Author: fjahanian
Date: Tue Jan 19 12:39:17 2010
New Revision: 93887

URL: http://llvm.org/viewvc/llvm-project?rev=93887&view=rev
Log:
objective-c test case for __attribute__((unused)) on method arguments.

Added:
    cfe/trunk/test/SemaObjC/method-unused-attribute.m

Added: cfe/trunk/test/SemaObjC/method-unused-attribute.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-unused-attribute.m?rev=93887&view=auto

==============================================================================
--- cfe/trunk/test/SemaObjC/method-unused-attribute.m (added)
+++ cfe/trunk/test/SemaObjC/method-unused-attribute.m Tue Jan 19 12:39:17 2010
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1  -fsyntax-only -Wunused-parameter -verify %s
+
+ at 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;
+ at end
+
+ at 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'}}
+ at end
+





More information about the cfe-commits mailing list