diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-06-07 01:10:35 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-06-07 01:10:35 +0000 |
commit | 826eac59e4b107973ed1c5a761ad8785aa1bcde4 (patch) | |
tree | c15182bbeb10fc321a936990e0f12b1010a59a9e /lib/Sema/SemaExprObjC.cpp | |
parent | d880b3aa6d594d1a7f2d307c29378c6f59b216ff (diff) |
Attach fixits for CFBridgingRetain/Release outside any casts.
Before, the note showed the location where you could insert __bridge variants,
but the actual fixit edit came after the cast.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index ed1a112a7e..c1df87370c 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -2918,7 +2918,8 @@ diagnoseObjCARCConversion(Sema &S, SourceRange castRange, castType, castExpr, "__bridge ", 0); } { - DiagnosticBuilder DiagB = S.Diag(noteLoc, diag::note_arc_bridge_transfer) + DiagnosticBuilder DiagB = S.Diag(br ? castExpr->getExprLoc() : noteLoc, + diag::note_arc_bridge_transfer) << castExprType << br; addFixitForObjCARCConversion(S, DiagB, CCK, afterLParen, castType, castExpr, "__bridge_transfer ", @@ -2946,7 +2947,8 @@ diagnoseObjCARCConversion(Sema &S, SourceRange castRange, castType, castExpr, "__bridge ", 0); } { - DiagnosticBuilder DiagB = S.Diag(noteLoc, diag::note_arc_bridge_retained) + DiagnosticBuilder DiagB = S.Diag(br ? castExpr->getExprLoc() : noteLoc, + diag::note_arc_bridge_retained) << castType << br; addFixitForObjCARCConversion(S, DiagB, CCK, afterLParen, castType, castExpr, "__bridge_retained ", |