summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-06-07 01:10:35 +0000
committerJordan Rose <jordan_rose@apple.com>2012-06-07 01:10:35 +0000
commitaefcedae65409cefd7386e689fdb88278eb3c920 (patch)
tree5ef58d612b08e38adb941af212ac0166989d4ba6 /clang/lib/Sema/SemaExprObjC.cpp
parent288c421b3d9a9c84b310088ce54c11c050775b9f (diff)
downloadbcm5719-llvm-aefcedae65409cefd7386e689fdb88278eb3c920.tar.gz
bcm5719-llvm-aefcedae65409cefd7386e689fdb88278eb3c920.zip
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. llvm-svn: 158131
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index ed1a112a7eb..c1df87370c3 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/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 ",
OpenPOWER on IntegriCloud