blob: 30e0dce4bdabc9326bf505515ce3a6af8b6b4810 [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -verify -fms-extensions -Wno-objc-root-class %s
Steve Naroff0326e042008-06-03 13:21:30 +00002@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
3typedef struct _NSRange { } NSRange;
4
5@class PBXFileReference;
6
7@interface PBXDocBookmark
Richard Trieu2fe9b7f2011-12-15 00:38:15 +00008+ alloc; // expected-note {{method definition for 'alloc' not found}}
9- autorelease; // expected-note {{method definition for 'autorelease' not found}}
Steve Naroff0326e042008-06-03 13:21:30 +000010@end
Steve Naroffa2ac06e2008-06-03 17:15:29 +000011
12// GCC allows pointer expressions in integer constant expressions.
13struct {
14 char control[((int)(char *)2)];
15} xx;
16
Fariborz Jahanian8822f7c2010-03-27 19:02:17 +000017@implementation PBXDocBookmark // expected-warning {{incomplete implementation}}
Steve Naroff0326e042008-06-03 13:21:30 +000018
19+ (id)bookmarkWithFileReference:(PBXFileReference *)fileRef gylphRange:(NSRange)range anchor:(NSString *)htmlAnchor
20{
21 NSRange r = (NSRange)range;
22 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')}}
23}
24@end