
We have a new policy in place making links to private resources something we try to avoid in source and test files. Normally, we'd organically switch to the new policy rather than make a sweeping change across a project. However, Clang is in a somewhat special circumstance currently: recently, I've had several new contributors run into rdar links around test code which their patch was changing the behavior of. This turns out to be a surprisingly bad experience, especially for newer folks, for a handful of reasons: not understanding what the link is and feeling intimidated by it, wondering whether their changes are actually breaking something important to a downstream in some way, having to hunt down strangers not involved with the patch to impose on them for help, accidental pressure from asking for potentially private IP to be made public, etc. Because folks run into these links entirely by chance (through fixing bugs or working on new features), there's not really a set of problematic links to focus on -- all of the links have basically the same potential for causing these problems. As a result, this is an omnibus patch to remove all such links. This was not a mechanical change; it was done by manually searching for rdar, radar, radr, and other variants to find all the various problematic links. From there, I tried to retain or reword the surrounding comments so that we would lose as little context as possible. However, because most links were just a plain link with no supporting context, the majority of the changes are simple removals. Differential Review: https://reviews.llvm.org/D158071
127 lines
3.3 KiB
Objective-C
127 lines
3.3 KiB
Objective-C
// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -Wno-objc-root-class %s
|
|
// expected-no-diagnostics
|
|
// FIXME: must also compile as Objective-C++
|
|
|
|
typedef struct objc_selector *SEL;
|
|
typedef signed char BOOL;
|
|
typedef unsigned int NSUInteger;
|
|
typedef struct _NSZone NSZone;
|
|
@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
|
|
@protocol NSObject
|
|
- (BOOL)isEqual:(id)object;
|
|
- (BOOL)respondsToSelector:(SEL)aSelector;
|
|
@end
|
|
@protocol NSCopying
|
|
- (id)copyWithZone:(NSZone *)zone;
|
|
@end
|
|
@protocol NSMutableCopying
|
|
- (id)mutableCopyWithZone:(NSZone *)zone;
|
|
@end
|
|
@protocol NSCoding
|
|
- (void)encodeWithCoder:(NSCoder *)aCoder;
|
|
@end
|
|
@interface NSObject <NSObject> {}
|
|
@end
|
|
@class NSString, NSData;
|
|
typedef struct _NSPoint {}
|
|
NSRange;
|
|
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>
|
|
- (NSUInteger)length;
|
|
@end
|
|
@interface NSMutableString : NSString
|
|
- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString;
|
|
@end
|
|
@class NSArray, NSDictionary, NSMapTable;
|
|
@interface NSResponder : NSObject <NSCoding> {}
|
|
@end
|
|
@protocol NSAnimatablePropertyContainer
|
|
- (id)animator;
|
|
@end
|
|
extern NSString *NSAnimationTriggerOrderIn ;
|
|
@interface NSView : NSResponder <NSAnimatablePropertyContainer> {
|
|
struct __VFlags2 {} _vFlags2;
|
|
}
|
|
@end
|
|
@class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
|
|
@interface FooiagramView : NSView {
|
|
id _delegate;
|
|
}
|
|
@end
|
|
@class FooiagramView;
|
|
@interface _FooiagramViewReserved : NSObject {
|
|
@public
|
|
NSMutableString *_typeToSelectString;
|
|
struct _FooiagramViewFlags {
|
|
unsigned int delegateRespondsToPrintInfoForBarView : 1;
|
|
} _dvFlags;
|
|
}
|
|
@end
|
|
extern _FooiagramViewReserved *_FooiagramViewBarViewReserved(FooiagramView *BarView);
|
|
@interface FooiagramView (FooiagramViewPrivate)
|
|
+ (Class)_defaultBarToolManagerClass;
|
|
@end
|
|
@implementation FooiagramView
|
|
static NSMapTable *_defaultMenuForClass = 0;
|
|
- (void)setDelegate:(id)delegate {
|
|
if (_delegate != delegate) {
|
|
struct _FooiagramViewFlags *dvFlags =
|
|
&_FooiagramViewBarViewReserved(self)->_dvFlags;
|
|
if (_delegate != ((void *)0)) {
|
|
dvFlags->delegateRespondsToPrintInfoForBarView = [_delegate respondsToSelector:@selector(printInfoForBarView:)];
|
|
}
|
|
}
|
|
}
|
|
@end
|
|
|
|
@interface WizKing_MIKeep {
|
|
struct __LoreStuffNode *_historyStuff;
|
|
}
|
|
@end
|
|
typedef struct __LoreStuffNode {} LoreStuffNode;
|
|
@implementation WizKing_MIKeep
|
|
- init {
|
|
LoreStuffNode *node;
|
|
node = &(_historyStuff[1]);
|
|
return 0;
|
|
}
|
|
@end
|
|
|
|
typedef long unsigned int __darwin_size_t;
|
|
typedef __darwin_size_t size_t;
|
|
void *memset(void *, int, size_t);
|
|
@class NSString, NSURL, NSError;
|
|
@interface OingoWerdnaPeon : NSObject {}
|
|
@end typedef enum {
|
|
OingoPT_SmashOK, OingoPT_NoSuchFile, }
|
|
OingoWerdnaPeonIOMethod;
|
|
@interface OingoWerdnaPeonSmashDrivel : NSObject <NSCopying> {}
|
|
@end
|
|
@interface OingoBoingoContraptionPeon : OingoWerdnaPeon {
|
|
struct _OingoBoingoContraptionPeonFlags {}
|
|
_nfttFlags;
|
|
}
|
|
@end
|
|
@implementation OingoBoingoContraptionPeon
|
|
+ (void)initialize {}
|
|
- (id)initWithSmashDrivel:(OingoWerdnaPeonSmashDrivel *)info {
|
|
if (self != ((void *)0)) {
|
|
(void)memset(&_nfttFlags, 0, sizeof(struct _OingoBoingoContraptionPeonFlags));
|
|
}
|
|
return 0;
|
|
}
|
|
@end
|
|
|
|
@interface Blah {
|
|
struct X {
|
|
int x;
|
|
} value;
|
|
}
|
|
@end
|
|
|
|
@implementation Blah
|
|
- (int)getValue {
|
|
struct X *xp = &value;
|
|
return xp->x;
|
|
}
|
|
@end
|