diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-12-20 01:03:40 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-12-20 01:03:40 +0000 |
commit | d9d12e0c0b1ad3ab6eafa18a454e1a72ce351dd2 (patch) | |
tree | acae7ef7bf683e7998cdbc94485aa7481c8620fe /lib/Parse/ParseExpr.cpp | |
parent | 305dc3ebaa0bea5f3b789e4b54afc79c25907615 (diff) |
Refine error diagnostic for using bridged casts when not using ARC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index bb26e28c12..6fc2dec62f 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -1824,11 +1824,12 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, Tok.is(tok::kw___bridge_retained) || Tok.is(tok::kw___bridge_retain))); if (BridgeCast && !getLang().ObjCAutoRefCount) { + StringRef BridgeCastName = Tok.getName(); SourceLocation BridgeKeywordLoc = ConsumeToken(); if (!PP.getSourceManager().isInSystemHeader(BridgeKeywordLoc)) - Diag(BridgeKeywordLoc, diag::err_arc_bridge_cast) - << FixItHint::CreateReplacement(BridgeKeywordLoc, - ""); + Diag(BridgeKeywordLoc, diag::err_arc_bridge_cast_nonarc) + << BridgeCastName + << FixItHint::CreateReplacement(BridgeKeywordLoc, ""); BridgeCast = false; } |