From 2cd7e8652c10bc19c0fb1ab24bb3aa54d8d2f0ff Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 9 May 2017 01:54:51 +0000 Subject: [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 llvm-svn: 302503 --- clang/lib/Sema/SemaExprObjC.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang') diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index a44e9243e3c..28581bad1a7 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -4241,8 +4241,7 @@ void Sema::diagnoseARCUnbridgedCast(Expr *e) { castType = cast->getTypeAsWritten(); CCK = CCK_OtherCast; } else { - castType = cast->getType(); - CCK = CCK_ImplicitConversion; + llvm_unreachable("Unexpected ImplicitCastExpr"); } ARCConversionTypeClass castACTC = -- cgit v1.2.3