]> granicus.if.org Git - clang/commit
[Sema][ObjC] Do not propagate the nullability specifier on the receiver
authorAkira Hatanaka <ahatanaka@apple.com>
Thu, 26 Jul 2018 17:51:13 +0000 (17:51 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Thu, 26 Jul 2018 17:51:13 +0000 (17:51 +0000)
commitdcd0309c08ba6c3c39bb75ed975fcf95ca63ad7f
tree1097dfdbbe3d53291978293205589b55cd3e01aa
parenta37cc0790f54b6fa8fdbe1a337ea6324d99cf8fd
[Sema][ObjC] Do not propagate the nullability specifier on the receiver
to the result type of a message send if the result type cannot have a
nullability specifier.

Previously, clang would print the following message when the code in
nullability.m was compiled:

"incompatible integer to pointer conversion initializing 'int *' with
an expression of type 'int _Nullable'"

This is wrong as 'int' isn't supposed to have any nullability
specifiers.

rdar://problem/40830514

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338048 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExprObjC.cpp
test/SemaObjC/nullability.m