[PATCH] Fix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual inheritance hierarchy

Timur Iskhodzhanov timurrrr at google.com
Fri Mar 7 01:41:53 PST 2014


  r203222.


================
Comment at: lib/AST/VTableBuilder.cpp:2909
@@ -2946,1 +2908,3 @@
 
+      ReturnAdjustingThunk = (MD != OverriderMD) || !ThisAdjustmentOffset.isEmpty();
+
----------------
Reid Kleckner wrote:
> Can you comment on why these conditions imply a return adjusting thunk?
Done; also, re-written the condition to make it simpler to read.

================
Comment at: test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp:220
@@ -219,3 +219,1 @@
 
-struct X : virtual VBase {
-  int x;
----------------
Reid Kleckner wrote:
> Why change this?
The X base was introduced in r202331 to avoid err-out'ing on `CheckBadVirtualInheritanceHierarchy()`.
We don't need this temporary hack anymore.


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



More information about the cfe-commits mailing list