From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaObjC/method-unused-attribute.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 clang/test/SemaObjC/method-unused-attribute.m (limited to 'clang/test/SemaObjC/method-unused-attribute.m') diff --git a/clang/test/SemaObjC/method-unused-attribute.m b/clang/test/SemaObjC/method-unused-attribute.m new file mode 100644 index 0000000..d604c39 --- /dev/null +++ b/clang/test/SemaObjC/method-unused-attribute.m @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -verify -Wno-objc-root-class %s + +@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{ +} +- (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'}} +@end + -- cgit v1.2.3