[PATCH] MS ABI: Consider alignment attributes on typedefs for layout

Reid Kleckner rnk at google.com
Tue Jul 29 18:17:18 PDT 2014


lgtm

================
Comment at: lib/AST/RecordLayoutBuilder.cpp:2264-2265
@@ -2263,4 +2263,4 @@
   ElementInfo Info;
   std::tie(Info.Size, Info.Alignment) =
-      Context.getTypeInfoInChars(FD->getType());
+      Context.getTypeInfoInChars(FD->getType()->getUnqualifiedDesugaredType());
   // Respect align attributes.
----------------
Add a comment that this ignores alignment attributes, i.e. it gets the natural alignment.

http://reviews.llvm.org/D4714






More information about the cfe-commits mailing list