Commits

Joe Groff committed e1ed305764e
SILGen: Improve "mayLieAboutOptionalReturn" handling. - Now that *Pointer types are imported with nullability, there's the potential for non-object pointer APIs to lie about their nullability, so extend the hack to cover them. - We would incorrectly consider a call like "struct.functionPointer()", where functionPointer is a property of block or function pointer type, to be able to lie about its return type nullability, even if the function pointer's own return type was a value type that isn't nullable. This would lead us to generate nonsense bitcast instructions from () to ()? that would get lowered to traps in IRGen. Fix this by checking for nullable types only on the types of expressions, where we have semantic information enough to understand what the types really mean, and only checking the Clang-ness of declarations. Fixes rdar://problem/23346344.