aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-07-31 01:07:43 +0000
committerJordan Rose <jordan_rose@apple.com>2012-07-31 01:07:43 +0000
commit2f71622dc8888e6da7ce786e42e8e9fbab075de6 (patch)
tree3b50727b6d268a1e4de052ad7f2e4577a2039e96 /lib/Sema/SemaExprObjC.cpp
parent437fbc51c260780af2f639da6af1c1f91e66f2ab (diff)
Explain why ACC_bottom should never occur in diagnosing ARC casts.
This is just a clarification on Fariborz's original patch, per e-mail discussion. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index a50054405e..d57329b69e 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -2860,15 +2860,15 @@ diagnoseObjCARCConversion(Sema &S, SourceRange castRange,
<< castRange
<< castExpr->getSourceRange();
bool br = S.isKnownName("CFBridgingRelease");
- ACCResult CreateRule =
+ ACCResult CreateRule =
ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr);
+ assert(CreateRule != ACC_bottom && "This cast should already be accepted.");
if (CreateRule != ACC_plusOne)
{
DiagnosticBuilder DiagB = S.Diag(noteLoc, diag::note_arc_bridge);
addFixitForObjCARCConversion(S, DiagB, CCK, afterLParen,
castType, castExpr, "__bridge ", 0);
}
- assert (CreateRule != ACC_bottom);
if (CreateRule != ACC_plusZero)
{
DiagnosticBuilder DiagB = S.Diag(br ? castExpr->getExprLoc() : noteLoc,
@@ -2895,13 +2895,13 @@ diagnoseObjCARCConversion(Sema &S, SourceRange castRange,
<< castExpr->getSourceRange();
ACCResult CreateRule =
ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr);
+ assert(CreateRule != ACC_bottom && "This cast should already be accepted.");
if (CreateRule != ACC_plusOne)
{
DiagnosticBuilder DiagB = S.Diag(noteLoc, diag::note_arc_bridge);
addFixitForObjCARCConversion(S, DiagB, CCK, afterLParen,
castType, castExpr, "__bridge ", 0);
}
- assert (CreateRule != ACC_bottom);
if (CreateRule != ACC_plusZero)
{
DiagnosticBuilder DiagB = S.Diag(br ? castExpr->getExprLoc() : noteLoc,