Refine r251469 to give better (and more localizable) diagnostics
for all the reasons that ARC makes things implicitly unavailable. llvm-svn: 251496
This commit is contained in:
@@ -100,9 +100,8 @@ bool Sema::checkInitMethod(ObjCMethodDecl *method,
|
||||
// If we're in a system header, and this is not a call, just make
|
||||
// the method unusable.
|
||||
if (receiverTypeIfCall.isNull() && getSourceManager().isInSystemHeader(loc)) {
|
||||
method->addAttr(UnavailableAttr::CreateImplicit(Context,
|
||||
"init method returns a type unrelated to its receiver type",
|
||||
loc));
|
||||
method->addAttr(UnavailableAttr::CreateImplicit(Context, "",
|
||||
UnavailableAttr::IR_ARCInitReturnsUnrelated, loc));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user