[PATCH] D21453: Add support for attribute "overallocated"
Akira Hatanaka via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 8 12:55:07 PDT 2016
ahatanak marked 7 inline comments as done.
================
Comment at: include/clang/AST/Decl.h:3249
@@ -3248,1 +3248,3 @@
+ /// This is true if this struct ends with an array marked 'flexible_array'.
+ bool HasFlexibleArrayAttr : 1;
----------------
Probably it can be looked up although it would require incrementing the field_iterator until it reaches the last non-static data member of the record.
================
Comment at: lib/AST/ExprConstant.cpp:170
@@ +169,3 @@
+ /// Indicator of whether the last array added is marked flexible_array.
+ bool IsFlexibleArray : 1;
+
----------------
I don't think there is a way to do that reliably. The FieldDecl for the array isn't always available in struct LValue, as far as I can tell, so it looks like we'll need a bit here.
http://reviews.llvm.org/D21453
More information about the cfe-commits
mailing list