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:
John McCall
2015-10-28 05:03:19 +00:00
parent 9b1534df9d
commit c6af8c606d
12 changed files with 122 additions and 71 deletions

View File

@@ -3472,7 +3472,7 @@ diagnoseObjCARCConversion(Sema &S, SourceRange castRange,
(castRange.isValid() ? castRange.getBegin() : castExpr->getExprLoc());
if (S.makeUnavailableInSystemHeader(loc,
"converts between Objective-C and C pointers in -fobjc-arc"))
UnavailableAttr::IR_ARCForbiddenConversion))
return;
QualType castExprType = castExpr->getType();