[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / SemaObjC / gcc-cast-ext.m
blob2eb707065d9f0c2a85e92e6fda091007adeae07e
1 // RUN: %clang_cc1 -verify -Wno-pointer-to-int-cast -Wno-objc-root-class %s
2 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
3 typedef struct _NSRange { } NSRange;
5 @class PBXFileReference;
7 @interface PBXDocBookmark
8 + alloc;        // expected-note {{method 'alloc' declared here}}
9 - autorelease;  // expected-note {{method 'autorelease' declared here}}
10 @end
12 // GCC allows pointer expressions in integer constant expressions.
13 struct {
14   char control[((int)(char *)2)]; // expected-warning {{extension}}
15 } xx;
17 @implementation PBXDocBookmark // expected-warning {{method definition for 'autorelease' not found}}\
18                                // expected-warning {{method definition for 'alloc' not found}}
20 + (id)bookmarkWithFileReference:(PBXFileReference *)fileRef gylphRange:(NSRange)range anchor:(NSString *)htmlAnchor
22     NSRange r = (NSRange)range;
23     return [[[self alloc] initWithFileReference:fileRef gylphRange:(NSRange)range anchor:(NSString *)htmlAnchor] autorelease];  // expected-warning {{method '-initWithFileReference:gylphRange:anchor:' not found (return type defaults to 'id')}}
25 @end