blob: 28abfbc8b2abd7b65d7f93798f842e75740ef162 [file] [log] [blame]
Shih-wei Liaof8fd82b2010-02-10 11:10:31 -08001// RUN: %clang_cc1 %s -verify -fms-extensions
2@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
3typedef struct _NSRange { } NSRange;
4
5@class PBXFileReference;
6
7@interface PBXDocBookmark
8+ alloc;
9- autorelease;
10@end
11
12// GCC allows pointer expressions in integer constant expressions.
13struct {
14 char control[((int)(char *)2)];
15} xx;
16
17@implementation PBXDocBookmark // expected-warning {{incomplete implementation}} expected-warning {{method definition for 'autorelease' not found}} expected-warning {{method definition for 'alloc' not found}}
18
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