[PATCH] Microsoft C++ Record Layout

Eli Friedman eli.friedman at gmail.com
Wed Jul 10 19:01:09 PDT 2013


Please split out the SemaDecl.cpp changes into another patch.

Some of the changes to test/Sema/ms_class_layout.cpp don't look right;
are you sure they're accurate?

>   * It's still in two files and doesn't use CRTP.  The net overlap between the current record builder and this one is 7 member variables, 1 typedef and 10 functions with the same names but different functionality.  The closest functionality is laying out fields (non-bit-fields) but it rounds in a slightly different place and is only a few lines of code.  Basically although in spirit the ms and non-ms builders achieve similar goals, they do so in completely different ways.  I would use an analogy of implementing a dictionary using a B-tree or a red-black tree.  They may both implement a dictionary using a tree but don't actually have much of any share-able code.

It's also worth noting that you didn't implement -Wpadded...

-Eli




More information about the cfe-commits mailing list