[Sema][ObjC] Check whether a variable has a definition, rather than
checking its storage class, when determining whether casting a C pointer
to an ObjC pointer is allowed.

This change allows casting variables whose declarations are directly
contained in a linkage specification to an ObjC pointer type. Those
variables are treated as if they contain the extern specifier for the
purpose of determining whether they are definitions or not.

rdar://problem/29249853

Differential Revision: https://reviews.llvm.org/D31673

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299992 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 9003af0a2442571f26f2b53a8d19ee25450212ed)
2 files changed