1 // RUN: %clang_cc1 %s -verify -fno-builtin
3 _Static_assert(__has_feature(attribute_diagnose_if_objc), "feature check failed?");
5 #define _diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__)))
8 -(void)meth _diagnose_if(1, "don't use this", "warning"); // expected-note 1{{from 'diagnose_if'}}
9 @property (assign) id prop _diagnose_if(1, "don't use this", "warning"); // expected-note 2{{from 'diagnose_if'}}
13 [i meth]; // expected-warning {{don't use this}}
14 id o1 = i.prop; // expected-warning {{don't use this}}
15 id o2 = [i prop]; // expected-warning {{don't use this}}