================
Comment at: lib/AST/RecordLayoutBuilder.cpp:2156
@@ +2155,3 @@
+  if (!MaxFieldAlignment.isZero())
+    BaseAlignment = std::min(BaseAlignment,
+                             std::max(MaxFieldAlignment,
----------------
Reid Kleckner wrote:
> Remind me why this is a min?
#pragma pack(n) // which induces MaxFieldAlignment
says that the alignment of any field is at *most* n


================
Comment at: include/clang/AST/RecordLayout.h:87
@@ +86,3 @@
+    /// the __declspec(align()) trumps #pramga pack and must always be obeyed.
+    CharUnits RequiredAlignment;
+
----------------
Reid Kleckner wrote:
> What about record subobjects in plain C?  Don't they also have this property? 
>  Seems like it needs to live on ASTRecordLayout.
You're absolutely right, this is a property that C also has and should live in 
the ASTRecordLayout rather than the CXXInfo.



http://llvm-reviews.chandlerc.com/D2283
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to