[CodeGenObjC] Fix a crash when attempting to copy a zero-sized bit-field in a non...
authorErik Pilkington <erik.pilkington@gmail.com>
Mon, 6 Apr 2020 14:17:30 +0000 (10:17 -0400)
committerErik Pilkington <erik.pilkington@gmail.com>
Mon, 6 Apr 2020 20:04:13 +0000 (16:04 -0400)
commitd33c7de8e11f2727ef5e325d931ae94af8619bf9
treea55e605898d2c97268739432cedb007c38319ebd
parent549e87f3d04bbae91bc7bc38609ce7073e2c8a6d
[CodeGenObjC] Fix a crash when attempting to copy a zero-sized bit-field in a non-trivial C struct

Zero sized bit-fields aren't included in the CGRecordLayout, so we shouldn't be
calling EmitLValueForField for them. rdar://60695105

Differential revision: https://reviews.llvm.org/D76782
clang/include/clang/AST/NonTrivialTypeVisitor.h
clang/lib/CodeGen/CGNonTrivialStruct.cpp
clang/test/CodeGenObjC/strong-in-c-struct.m