================
Comment at: lib/AST/VTableBuilder.cpp:2221
@@ -2220,3 @@
-  
-  // Itanium C++ ABI 2.5.2:
-  //   The order of the virtual function pointers in a virtual table is the 
----------------
Reid Kleckner wrote:
> We're losing some of these spec references.  It looks like this one should 
> live in AddMethods().
I think I agree, I'll add this to AddMethods.
Hm, interesting - this wasn't there in the first place...

================
Comment at: lib/AST/VTableBuilder.cpp:2319
@@ -2318,3 @@
-    //   If a class has an implicitly-defined virtual destructor, 
-    //   its entries come after the declared virtual function pointers.
-
----------------
Reid Kleckner wrote:
> I don't think Test16::D triggers this case because ~D is overriding ~C, so it 
> goes into the vtable first.
> 
> When can you have an implicitly defined virtual dtor without overriding the 
> method of a base class?  Is that possible? Good question for Richard or John.
Err, no.
There's no ~D in Test16:D.

  struct C : ... { virtual ~C(); };
  struct D : virtual C {
    virtual void f(); 
  };

So C has virtual ~C, thus D should have a virtual dtor.
AFAIU, as there's no explicit ~D, there should be an implicit one.

Does that sound right?


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

Reply via email to