[cfe-commits] r158131 - /cfe/trunk/lib/Sema/SemaExprObjC.cpp
Jordan Rose
jordan_rose at apple.com
Wed Jun 6 18:10:35 PDT 2012
Author: jrose
Date: Wed Jun 6 20:10:35 2012
New Revision: 158131
URL: http://llvm.org/viewvc/llvm-project?rev=158131&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Sema/SemaExprObjC.cpp
Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=158131&r1=158130&r2=158131&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Wed Jun 6 20:10:35 2012
@@ -2918,7 +2918,8 @@
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 @@
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 ",
More information about the cfe-commits
mailing list