xref: /minix3/external/bsd/llvm/dist/clang/test/PCH/objc_exprs.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// Test this without pch.
2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc// Test with pch.
5*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h
6*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fblocks -include-pch %t -fsyntax-only -verify %s
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc// Expressions
9*f4a2713aSLionel Sambucint *A1 = (objc_string)0;   // expected-warning {{aka 'NSString *'}}
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambucchar A2 = (objc_encode){};  // expected-error {{not a compile-time constant}} \
12*f4a2713aSLionel Sambuc                               expected-warning {{char [2]}}
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambucint *A3 = (objc_protocol)0; // expected-warning {{aka 'Protocol *'}}
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc
17*f4a2713aSLionel Sambuc// Types.
18*f4a2713aSLionel Sambucint *T0 = (objc_id_protocol_ty)0; // expected-warning {{aka 'id<foo>'}}
19*f4a2713aSLionel Sambuc
20*f4a2713aSLionel Sambucint *T1 = (objc_interface_ty)0; // expected-warning {{aka 'itf *'}}
21*f4a2713aSLionel Sambucint *T2 = (objc_qual_interface_ty)0; // expected-warning {{aka 'itf<foo> *'}}
22*f4a2713aSLionel Sambuc
23*f4a2713aSLionel Sambucobjc_selector_noArgs s1;
24*f4a2713aSLionel Sambucobjc_selector_oneArg s2;
25*f4a2713aSLionel Sambucobjc_selector_twoArg s3;
26*f4a2713aSLionel Sambuc
27*f4a2713aSLionel Sambuc
28