The assertion is checking that the types of the parameter and argument match. It fails when a method of a parameterized class is called. To fix the failure, this patch moves the assertion in EmitCallArg to its only caller EmitCallArgs.
Instead of moving the assertion, it's also possible to call substObjCMemberType in EmitCallArgs (the template function in CodeGenFunction.h) to compute the correct parameter type and pass it down.
rdar://problem/32874473