r302503 - [Sema][ObjC] Clean up possible null dereference.
Akira Hatanaka via cfe-commits
cfe-commits at lists.llvm.org
Mon May 8 18:54:51 PDT 2017
Author: ahatanak
Date: Mon May 8 20:54:51 2017
New Revision: 302503
URL: http://llvm.org/viewvc/llvm-project?rev=302503&view=rev
Log:
[Sema][ObjC] Clean up possible null dereference.
It appears that the code is actually dead since unbridged-cast
placeholder types are created by calling CastOperation::complete and
ImplicitCastExprs are never passed to it.
Spotted by Vedant Kumar.
rdar://problem/31542226
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=302503&r1=302502&r2=302503&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Mon May 8 20:54:51 2017
@@ -4241,8 +4241,7 @@ void Sema::diagnoseARCUnbridgedCast(Expr
castType = cast->getTypeAsWritten();
CCK = CCK_OtherCast;
} else {
- castType = cast->getType();
- CCK = CCK_ImplicitConversion;
+ llvm_unreachable("Unexpected ImplicitCastExpr");
}
ARCConversionTypeClass castACTC =
More information about the cfe-commits
mailing list