blob: 0b20af84c6eec1e6928acfcc631c3aebecec9353 [file] [log] [blame]
Chris Lattner4dcf151a2009-04-22 05:57:30 +00001// Test this without pch.
2// RUN: clang-cc -fblocks -include %S/objc_exprs.h -fsyntax-only -verify %s &&
3
4// Test with pch.
5// RUN: clang-cc -x objective-c-header -emit-pch -fblocks -o %t %S/objc_exprs.h &&
6// RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s
7
Chris Lattnerd7a3fcd2009-04-22 06:40:03 +00008// Expressions
Chris Lattner3a57a372009-04-22 06:29:42 +00009int *A1 = (objc_string)0; // expected-warning {{'struct objc_object *'}}
10
Chris Lattnerd7a3fcd2009-04-22 06:40:03 +000011char A2 = (objc_encode){}; // expected-error {{not a compile-time constant}} \
Chris Lattner3a57a372009-04-22 06:29:42 +000012 expected-warning {{char [2]}}
13
14int *A3 = (objc_protocol)0; // expected-warning {{aka 'Protocol *'}}
15
16
Chris Lattnerd7a3fcd2009-04-22 06:40:03 +000017// Types.
18int *T0 = (objc_id_protocol_ty)0; // expected-error {{not a compile-time constant}} \
19 expected-warning {{aka 'id<foo>'}}
20
21
Chris Lattner3a57a372009-04-22 06:29:42 +000022