[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / SemaObjC / diagnose_if.m
blob9f281e4252dfa5cb2651061036da7ee5a557823c
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__)))
7 @interface I
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'}}
10 @end
12 void test(I *i) {
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}}