to an Objective-C instance variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97850
91177308-0d34-0410-b5e6-
96231b3b80d8
.Case("attribute_cf_returns_retained", true)
.Case("attribute_ns_returns_not_retained", true)
.Case("attribute_ns_returns_retained", true)
+ .Case("attribute_objc_ivar_unused", true)
.Default(false);
}
// instance variables, which GCC does not.
//===------------------------------------------------------------------------===
+#if __has_feature(attribute_objc_ivar_unused)
+#define UNUSED_IVAR __attribute__((unused))
+#else
+#error __attribute__((unused)) not supported on ivars
+#endif
+
@interface TestUnusedIvar {
- id x __attribute__((unused)); // no-warning
+ id y __attribute__((unused)); // no-warning
+ id x UNUSED_IVAR; // no-warning
}
@end
+