]> granicus.if.org Git - clang/commitdiff
Add virtual operator= example.
authorAnders Carlsson <andersca@mac.com>
Thu, 11 Feb 2010 18:21:49 +0000 (18:21 +0000)
committerAnders Carlsson <andersca@mac.com>
Thu, 11 Feb 2010 18:21:49 +0000 (18:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95888 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/vtable-layout.cpp

index dd9109e15894a9925e41a540e512a12143d52cdc..c59eff0abf8a715d4a21f65043175fd6b7e04ed1 100644 (file)
@@ -16,7 +16,7 @@ void A::f() { }
 namespace Test2 {
 
 // This is a smoke test of the vtable dumper.
-// CHECK:      Vtable for 'Test2::A' (8 entries).
+// CHECK:      Vtable for 'Test2::A' (9 entries).
 // CHECK-NEXT:   0 | offset_to_top (0)
 // CHECK-NEXT:   1 | Test2::A RTTI
 // CHECK-NEXT:       -- (Test2::A, 0) vtable address --
@@ -26,6 +26,7 @@ namespace Test2 {
 // CHECK-NEXT:   5 | Test2::A::~A() [complete]
 // CHECK-NEXT:   6 | Test2::A::~A() [deleting]
 // CHECK-NEXT:   7 | void Test2::A::h()
+// CHECK-NEXT:   8 | Test2::A &Test2::A::operator=(Test2::A const &)
 struct A {
   virtual void f();
   virtual void f() const;
@@ -33,6 +34,7 @@ struct A {
   virtual A* g(int a);
   virtual ~A();
   virtual void h();
+  virtual A& operator=(const A&);
 };
 
 void A::f() { }