Index: clang/lib/CodeGen/CGObjC.cpp =================================================================== --- clang/lib/CodeGen/CGObjC.cpp +++ clang/lib/CodeGen/CGObjC.cpp @@ -219,9 +219,8 @@ // Generate a reference to the class pointer, which will be the receiver. Selector Sel = MethodWithObjects->getSelector(); - QualType ResultType = E->getType(); - const ObjCObjectPointerType *InterfacePointerType - = ResultType->getAsObjCInterfacePointerType(); + const ObjCObjectPointerType *InterfacePointerType = + cast(E->getType()); ObjCInterfaceDecl *Class = InterfacePointerType->getObjectType()->getInterface(); CGObjCRuntime &Runtime = CGM.getObjCRuntime();