[CodeGen] Fix a crash that occurs when a non-trivial C struct with a
authorAkira Hatanaka <ahatanaka@apple.com>
Mon, 16 Apr 2018 19:38:00 +0000 (19:38 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Mon, 16 Apr 2018 19:38:00 +0000 (19:38 +0000)
commit1c3bd2ff0c71590ad02c68bf0d4bbd3bbc27837e
tree44512d33d16512e48ca5d8588a222452734c080a
parent92ad94e7cd8f95019d66b1534d6187f87c293a9c
[CodeGen] Fix a crash that occurs when a non-trivial C struct with a
volatile array field is copied.

The crash occurs because method 'visitArray' passes a null FieldDecl to
method 'visit' and some of the methods called downstream expect a
non-null FieldDecl to be passed.

rdar://problem/33599681

llvm-svn: 330151
clang/lib/CodeGen/CGNonTrivialStruct.cpp
clang/test/CodeGenObjC/strong-in-c-struct.m