Fix some unused variable, control reaches end of non-void function,
and uninitialized use options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62270 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index a285d75..29740fd 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -301,15 +301,14 @@
EmitScalarExpr(E->getBase()),
false, CallArgList());
}
- else if (const ObjCKVCRefExpr *E = dyn_cast<ObjCKVCRefExpr>(Exp)) {
+ else {
+ const ObjCKVCRefExpr *E = cast<ObjCKVCRefExpr>(Exp);
Selector S = E->getGetterMethod()->getSelector();
return CGM.getObjCRuntime().
GenerateMessageSend(*this, Exp->getType(), S,
EmitScalarExpr(E->getBase()),
false, CallArgList());
}
- else
- assert (0 && "bad expression node in EmitObjCPropertyGet");
}
void CodeGenFunction::EmitObjCPropertySet(const Expr *Exp,