Skip to content

Commit e0ac46e

Browse files
committed
Revert "Remove rdar links; NFC"
This reverts commit d618f1c. This commit wasn't reviewed ahead of time and significant concerns were raised immediately after it landed. According to our developer policy this warrants immediate revert of the commit. https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy Differential Revision: https://reviews.llvm.org/D155509
1 parent a5cee3e commit e0ac46e

File tree

1,244 files changed

+9800
-7680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,244 files changed

+9800
-7680
lines changed

clang/lib/Analysis/CFG.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,8 @@ CFGBlock *CFGBuilder::Visit(Stmt * S, AddStmtChoice asc,
22522252
// FIXME: The expression inside a CXXDefaultArgExpr is owned by the
22532253
// called function's declaration, not by the caller. If we simply add
22542254
// this expression to the CFG, we could end up with the same Expr
2255-
// appearing multiple times. PR13385
2255+
// appearing multiple times.
2256+
// PR13385 / <rdar://problem/12156507>
22562257
//
22572258
// It's likewise possible for multiple CXXDefaultInitExprs for the same
22582259
// expression to be used in the same function (through aggregate

clang/lib/Analysis/RetainSummaryManager.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ const RetainSummary *RetainSummaryManager::getSummaryForObjCOrCFObject(
301301

302302
std::string RetTyName = RetTy.getAsString();
303303
if (FName == "pthread_create" || FName == "pthread_setspecific") {
304+
// Part of: <rdar://problem/7299394> and <rdar://problem/11282706>.
304305
// This will be addressed better with IPA.
305306
return getPersistentStopSummary();
306307
} else if(FName == "NSMakeCollectable") {
@@ -310,6 +311,7 @@ const RetainSummary *RetainSummaryManager::getSummaryForObjCOrCFObject(
310311
: getPersistentStopSummary();
311312
} else if (FName == "CMBufferQueueDequeueAndRetain" ||
312313
FName == "CMBufferQueueDequeueIfDataReadyAndRetain") {
314+
// Part of: <rdar://problem/39390714>.
313315
return getPersistentSummary(RetEffect::MakeOwned(ObjKind::CF),
314316
ScratchArgs,
315317
ArgEffect(DoNothing),
@@ -322,11 +324,13 @@ const RetainSummary *RetainSummaryManager::getSummaryForObjCOrCFObject(
322324
FName == "IOServiceNameMatching" ||
323325
FName == "IORegistryEntryIDMatching" ||
324326
FName == "IOOpenFirmwarePathMatching"))) {
327+
// Part of <rdar://problem/6961230>. (IOKit)
325328
// This should be addressed using a API table.
326329
return getPersistentSummary(RetEffect::MakeOwned(ObjKind::CF), ScratchArgs,
327330
ArgEffect(DoNothing), ArgEffect(DoNothing));
328331
} else if (FName == "IOServiceGetMatchingService" ||
329332
FName == "IOServiceGetMatchingServices") {
333+
// FIXES: <rdar://problem/6326900>
330334
// This should be addressed using a API table. This strcmp is also
331335
// a little gross, but there is no need to super optimize here.
332336
ScratchArgs = AF.add(ScratchArgs, 1, ArgEffect(DecRef, ObjKind::CF));
@@ -335,12 +339,14 @@ const RetainSummary *RetainSummaryManager::getSummaryForObjCOrCFObject(
335339
ArgEffect(DoNothing), ArgEffect(DoNothing));
336340
} else if (FName == "IOServiceAddNotification" ||
337341
FName == "IOServiceAddMatchingNotification") {
342+
// Part of <rdar://problem/6961230>. (IOKit)
338343
// This should be addressed using a API table.
339344
ScratchArgs = AF.add(ScratchArgs, 2, ArgEffect(DecRef, ObjKind::CF));
340345
return getPersistentSummary(RetEffect::MakeNoRet(),
341346
ScratchArgs,
342347
ArgEffect(DoNothing), ArgEffect(DoNothing));
343348
} else if (FName == "CVPixelBufferCreateWithBytes") {
349+
// FIXES: <rdar://problem/7283567>
344350
// Eventually this can be improved by recognizing that the pixel
345351
// buffer passed to CVPixelBufferCreateWithBytes is released via
346352
// a callback and doing full IPA to make sure this is done correctly.
@@ -351,13 +357,15 @@ const RetainSummary *RetainSummaryManager::getSummaryForObjCOrCFObject(
351357
ScratchArgs,
352358
ArgEffect(DoNothing), ArgEffect(DoNothing));
353359
} else if (FName == "CGBitmapContextCreateWithData") {
360+
// FIXES: <rdar://problem/7358899>
354361
// Eventually this can be improved by recognizing that 'releaseInfo'
355362
// passed to CGBitmapContextCreateWithData is released via
356363
// a callback and doing full IPA to make sure this is done correctly.
357364
ScratchArgs = AF.add(ScratchArgs, 8, ArgEffect(ArgEffect(StopTracking)));
358365
return getPersistentSummary(RetEffect::MakeOwned(ObjKind::CF), ScratchArgs,
359366
ArgEffect(DoNothing), ArgEffect(DoNothing));
360367
} else if (FName == "CVPixelBufferCreateWithPlanarBytes") {
368+
// FIXES: <rdar://problem/7283567>
361369
// Eventually this can be improved by recognizing that the pixel
362370
// buffer passed to CVPixelBufferCreateWithPlanarBytes is released
363371
// via a callback and doing full IPA to make sure this is done
@@ -378,9 +386,10 @@ const RetainSummary *RetainSummaryManager::getSummaryForObjCOrCFObject(
378386
ArgEffect(DoNothing), ArgEffect(DoNothing));
379387
} else if (FName == "dispatch_set_context" ||
380388
FName == "xpc_connection_set_context") {
381-
// The analyzer currently doesn't have a good way to reason about the
382-
// finalizer function for libdispatch. If we pass a context object that is
383-
// memory managed, stop tracking it.
389+
// <rdar://problem/11059275> - The analyzer currently doesn't have
390+
// a good way to reason about the finalizer function for libdispatch.
391+
// If we pass a context object that is memory managed, stop tracking it.
392+
// <rdar://problem/13783514> - Same problem, but for XPC.
384393
// FIXME: this hack should possibly go away once we can handle
385394
// libdispatch and XPC finalizers.
386395
ScratchArgs = AF.add(ScratchArgs, 1, ArgEffect(StopTracking));
@@ -731,6 +740,7 @@ RetainSummaryManager::canEval(const CallExpr *CE, const FunctionDecl *FD,
731740
// It's okay to be a little sloppy here.
732741
if (FName == "CMBufferQueueDequeueAndRetain" ||
733742
FName == "CMBufferQueueDequeueIfDataReadyAndRetain") {
743+
// Part of: <rdar://problem/39390714>.
734744
// These are not retain. They just return something and retain it.
735745
return std::nullopt;
736746
}
@@ -1233,6 +1243,7 @@ void RetainSummaryManager::InitializeMethodSummaries() {
12331243
// FIXME: For now we opt for false negatives with NSWindow, as these objects
12341244
// self-own themselves. However, they only do this once they are displayed.
12351245
// Thus, we need to track an NSWindow's display status.
1246+
// This is tracked in <rdar://problem/6062711>.
12361247
// See also http://llvm.org/bugs/show_bug.cgi?id=3714.
12371248
const RetainSummary *NoTrackYet =
12381249
getPersistentSummary(RetEffect::MakeNoRet(), ScratchArgs,
@@ -1248,6 +1259,7 @@ void RetainSummaryManager::InitializeMethodSummaries() {
12481259

12491260
// For NSNull, objects returned by +null are singletons that ignore
12501261
// retain/release semantics. Just don't track them.
1262+
// <rdar://problem/12858915>
12511263
addClassMethSummary("NSNull", "null", NoTrackYet);
12521264

12531265
// Don't track allocated autorelease pools, as it is okay to prematurely

clang/lib/CodeGen/CGObjCMac.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3329,7 +3329,7 @@ CGObjCCommonMac::EmitProtocolMethodTypes(Twine Name,
33293329
struct _objc_method_list *instance_methods;
33303330
struct _objc_method_list *class_methods;
33313331
struct _objc_protocol_list *protocols;
3332-
uint32_t size;
3332+
uint32_t size; // <rdar://4585769>
33333333
struct _objc_property_list *instance_properties;
33343334
struct _objc_property_list *class_properties;
33353335
};
@@ -4492,7 +4492,8 @@ llvm::FunctionType *FragileHazards::GetAsmFnType() {
44924492
indeterminate value. For the purposes of LLVM IR, it may be
44934493
sufficient to make loads and stores within the @try (to variables
44944494
declared outside the @try) volatile. This is necessary for
4495-
optimized correctness, but is not currently being done.
4495+
optimized correctness, but is not currently being done; this is
4496+
being tracked as rdar://problem/8160285
44964497
44974498
The basic framework for a @try-catch-finally is as follows:
44984499
{
@@ -5091,7 +5092,7 @@ enum ImageInfoFlags {
50915092
eImageInfo_OptimizedByDyld = (1 << 3), // This flag is set by the dyld shared cache.
50925093

50935094
// A flag indicating that the module has no instances of a @synthesize of a
5094-
// superclass variable.
5095+
// superclass variable. <rdar://problem/6803242>
50955096
eImageInfo_CorrectedSynthesize = (1 << 4), // This flag is no longer set by clang.
50965097
eImageInfo_ImageIsSimulated = (1 << 5),
50975098
eImageInfo_ClassProperties = (1 << 6)

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5979,7 +5979,7 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) {
59795979
}
59805980

59815981
// Note: -fwritable-strings doesn't make the backing store strings of
5982-
// CFStrings writable.
5982+
// CFStrings writable. (See <rdar://problem/10657500>)
59835983
auto *GV =
59845984
new llvm::GlobalVariable(getModule(), C->getType(), /*isConstant=*/true,
59855985
llvm::GlobalValue::PrivateLinkage, C, ".str");

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5562,7 +5562,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
55625562
}
55635563

55645564
// Enable -mconstructor-aliases except on darwin, where we have to work around
5565-
// a linker bug, and CUDA device code, where aliases aren't supported.
5565+
// a linker bug (see <rdar://problem/7651567>), and CUDA device code, where
5566+
// aliases aren't supported.
55665567
if (!RawTriple.isOSDarwin() && !RawTriple.isNVPTX())
55675568
CmdArgs.push_back("-mconstructor-aliases");
55685569

clang/lib/Sema/SemaObjCProperty.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2795,7 +2795,9 @@ void Sema::CheckObjCPropertyAttributes(Decl *PDecl,
27952795
}
27962796

27972797
// FIXME: Implement warning dependent on NSCopying being
2798-
// implemented. (Please trim this list while you are at it.)
2798+
// implemented. See also:
2799+
// <rdar://5168496&4855821&5607453&5096644&4947311&5698469&4947014&5168496>
2800+
// (please trim this list while you are at it).
27992801
}
28002802

28012803
if (!(Attributes & ObjCPropertyAttribute::kind_copy) &&

clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ void WalkAST::VisitForStmt(ForStmt *FS) {
219219

220220
//===----------------------------------------------------------------------===//
221221
// Check: floating point variable used as loop counter.
222+
// Originally: <rdar://problem/6336718>
222223
// Implements: CERT security coding advisory FLP-30.
223224
//===----------------------------------------------------------------------===//
224225

@@ -467,6 +468,7 @@ void WalkAST::checkCall_bzero(const CallExpr *CE, const FunctionDecl *FD) {
467468

468469
//===----------------------------------------------------------------------===//
469470
// Check: Any use of 'gets' is insecure.
471+
// Originally: <rdar://problem/6335715>
470472
// Implements (part of): 300-BSI (buildsecurityin.us-cert.gov)
471473
// CWE-242: Use of Inherently Dangerous Function
472474
//===----------------------------------------------------------------------===//
@@ -846,6 +848,7 @@ bool WalkAST::checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD) {
846848

847849
//===----------------------------------------------------------------------===//
848850
// Check: Linear congruent random number generators should not be used
851+
// Originally: <rdar://problem/63371000>
849852
// CWE-338: Use of cryptographically weak prng
850853
//===----------------------------------------------------------------------===//
851854

@@ -889,6 +892,7 @@ void WalkAST::checkCall_rand(const CallExpr *CE, const FunctionDecl *FD) {
889892

890893
//===----------------------------------------------------------------------===//
891894
// Check: 'random' should not be used
895+
// Originally: <rdar://problem/63371000>
892896
//===----------------------------------------------------------------------===//
893897

894898
void WalkAST::checkCall_random(const CallExpr *CE, const FunctionDecl *FD) {
@@ -987,6 +991,7 @@ void WalkAST::checkMsg_decodeValueOfObjCType(const ObjCMessageExpr *ME) {
987991

988992
//===----------------------------------------------------------------------===//
989993
// Check: Should check whether privileges are dropped successfully.
994+
// Originally: <rdar://problem/6337132>
990995
//===----------------------------------------------------------------------===//
991996

992997
void WalkAST::checkUncheckedReturnValue(CallExpr *CE) {

clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,9 @@ RefLeakReportVisitor::getEndPath(BugReporterContext &BRC,
786786
assert(RV);
787787

788788
if (RV->getKind() == RefVal::ErrorLeakReturned) {
789-
// FIXME: "create" only applies to CF objects. Only "copy", "alloc",
790-
// "retain" and "new" transfer ownership to the caller for NS objects.
789+
// FIXME: Per comments in rdar://6320065, "create" only applies to CF
790+
// objects. Only "copy", "alloc", "retain" and "new" transfer ownership
791+
// to the caller for NS objects.
791792
const Decl *D = &EndN->getCodeDecl();
792793

793794
os << (isa<ObjCMethodDecl>(D) ? " is returned from a method "

clang/lib/StaticAnalyzer/Core/CallEvent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ RuntimeDefinition CXXInstanceCall::getRuntimeDefinition() const {
765765
// the static type. However, because we currently don't update
766766
// DynamicTypeInfo when an object is cast, we can't actually be sure the
767767
// DynamicTypeInfo is up to date. This assert should be re-enabled once
768-
// this is fixed.
768+
// this is fixed. <rdar://problem/12287087>
769769
//assert(!MD->getParent()->isDerivedFrom(RD) && "Bad DynamicTypeInfo");
770770

771771
return {};

clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void ExprEngine::VisitObjCMessage(const ObjCMessageExpr *ME,
178178
// We could avoid dropping coverage by performing an explicit case split
179179
// on each method call -- but this would get very expensive. An alternative
180180
// would be to introduce lazy constraints.
181-
// FIXME: This ignores many potential bugs.
181+
// FIXME: This ignores many potential bugs (<rdar://problem/11733396>).
182182
// Revisit once we have lazier constraints.
183183
if (Msg->isInstanceMessage()) {
184184
SVal recVal = Msg->getReceiverSVal();

clang/test/ARCMT/GC-check-warn-nsalloc.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %clang_cc1 -arcmt-action=check -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only %s 2>&1 | grep 'warning: \[rewriter\] call returns pointer to GC managed memory'
22
// RUN: %clang_cc1 -arcmt-action=check -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only -x objective-c++ %s 2>&1 | grep 'warning: \[rewriter\] call returns pointer to GC managed memory'
33
// TODO: Investigate VerifyDiagnosticConsumer failures on these tests when using -verify.
4+
// rdar://10532541
45

56
typedef unsigned NSUInteger;
67
void *__strong NSAllocateCollectable(NSUInteger size, NSUInteger options);

clang/test/ARCMT/GC-no-finalize-removal.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ -(void)test1:(CFTypeRef *)cft {
7777
}
7878
@end
7979

80+
// rdar://10532449
8081
@interface rdar10532449
8182
@property (assign) id assign_prop;
8283
@property (assign, readonly) id __strong strong_readonly_prop;

clang/test/ARCMT/GC-no-finalize-removal.m.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ __attribute__((objc_arc_weak_reference_unavailable))
8585
}
8686
@end
8787

88+
// rdar://10532449
8889
@interface rdar10532449
8990
@property (strong) id assign_prop;
9091
@property (strong, readonly) id strong_readonly_prop;

clang/test/ARCMT/GC.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ -(void)test1:(CFTypeRef *)cft {
7777
}
7878
@end
7979

80+
// rdar://10532449
8081
@interface rdar10532449
8182
@property (assign) id assign_prop;
8283
@property (assign, readonly) id __strong strong_readonly_prop;

clang/test/ARCMT/GC.m.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ __attribute__((objc_arc_weak_reference_unavailable))
7272
}
7373
@end
7474

75+
// rdar://10532449
7576
@interface rdar10532449
7677
@property (strong) id assign_prop;
7778
@property (strong, readonly) id strong_readonly_prop;

clang/test/ARCMT/check-with-pch.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %clang_cc1 -include-pch %t.pch -arcmt-action=check -verify -triple x86_64-apple-darwin10 -fblocks -Werror %s
33
// REQUIRES: x86-registered-target
44

5+
// rdar://9601437
56
@interface I9601437 {
67
__unsafe_unretained id x;
78
}

clang/test/ARCMT/checking.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ id test9(Test9 *v) {
288288
return [v init1];
289289
}
290290

291+
// rdar://9491791
291292
void rdar9491791(int p) {
292293
switch (p) {
293294
case 3:;
@@ -301,10 +302,12 @@ void rdar9491791(int p) {
301302

302303
#define RELEASE_MACRO(x) do { [x release]; } while(1)
303304

305+
// rdar://9504750
304306
void rdar9504750(id p) {
305307
RELEASE_MACRO(p); // expected-error {{ARC forbids explicit message send of 'release'}}
306308
}
307309

310+
// rdar://8939557
308311
@interface TestReadonlyProperty : NSObject
309312
@property(assign,readonly) NSObject *value;
310313
@end
@@ -316,6 +319,7 @@ - (void)viewDidLoad {
316319
}
317320
@end
318321

322+
// rdar://9601437
319323
@interface I9601437 {
320324
__unsafe_unretained id x;
321325
}

clang/test/ARCMT/no-canceling-bridge-to-bridge-cast.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clang_cc1 -arcmt-action=check -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -verify %s
2+
// rdar://10387088
23
typedef const void * CFTypeRef;
34
CFTypeRef CFBridgingRetain(id X);
45
id CFBridgingRelease(CFTypeRef);

clang/test/ARCMT/nonobjc-to-objc-cast-2.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ CFStringRef f3(void) {
5656

5757
extern void NSLog(NSString *format, ...);
5858

59+
// rdar://13192395
5960
void f4(NSString *s) {
6061
NSLog(@"%@", (CFStringRef)s); // expected-error {{cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast}} \
6162
// expected-note{{use __bridge to convert directly (no change in ownership)}} \

0 commit comments

Comments
 (0)