[PATCH] MS ABI: Improve selection of an inheritance model

Reid Kleckner rnk at google.com
Wed Jan 15 15:39:44 PST 2014


  LGTM with some bikeshedding


================
Comment at: lib/AST/MicrosoftCXXABI.cpp:178
@@ +177,3 @@
+    case MSInheritanceAttr::MSIM_Unspecified:
+      ++Ints; // VBTableOffset
+    case MSInheritanceAttr::MSIM_Virtual:
----------------
grumble grumble I liked the old formatting.


================
Comment at: include/clang/AST/DeclCXX.h:1602
@@ -1610,2 +1601,3 @@
   /// \brief Returns the inheritance model used for this record.
-  MSInheritanceModel getMSInheritanceModel() const;
+  MSInheritanceAttr::MSInheritanceModel getMSInheritanceModel() const;
+  /// \brief Locks-in the inheritance model for this class.
----------------
Whoa, long type name.  Maybe just MSInheritanceAttr::Model ?

================
Comment at: lib/Sema/SemaType.cpp:5068
@@ -5096,1 +5067,3 @@
 
+    // We lock-in the inheritance model once somebody has asked us to ensure
+    // that a pointer-to-member type is complete.
----------------
s/lock-in/lock in/

================
Comment at: test/SemaCXX/microsoft-abi-ptm.cpp:11
@@ +10,2 @@
+static_assert(sizeof(int B::*) == sizeof(int) * 3, "pointer-to-member should be sizeof(int) * 3");
+struct B { };
----------------
Add Richard's test?


http://llvm-reviews.chandlerc.com/D2548

BRANCH
  PR18479

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list