[PATCH] Sema: Treat zero sized arrays as flexible array members
David Majnemer
david.majnemer at gmail.com
Wed Sep 24 04:22:45 PDT 2014
Hi rsmith, rnk, andreadb,
Zero sized arrays are more or less the pre-standard version of flexible
array members. It makes sense to mark structs which contain them as
hasFlexibleArrayMember.
Doing this has the side effect of resolving PR21040, a crash involving
one record inheriting from a base which is terminated with a zero sized
array field.
http://reviews.llvm.org/D5478
Files:
include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
test/Analysis/dtors-in-dtor-cfg-output.cpp
test/CodeGenObjC/arc-captured-32bit-block-var-layout.m
test/CodeGenObjC/arc-captured-block-var-layout.m
test/SemaCXX/flexible-array-test.cpp
test/SemaCXX/zero-length-arrays.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5478.14028.patch
Type: text/x-patch
Size: 6943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140924/6c368e0c/attachment.bin>
More information about the cfe-commits
mailing list