diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-24 21:56:24 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-24 21:56:24 +0000 |
commit | b701d3d0b20b00cb3b1d874a23f1e8d450f989f8 (patch) | |
tree | cf5644c17dccf15f6a37c99e92a9c96ad68e8df8 /test/CodeGenCXX/virtual-implicit-move-assignment.cpp | |
parent | 5cbd751a2f9d73248c5336140d73680fcd4669a3 (diff) |
Always implicitly declare move assignment operations for dynamic classes, in
case they override virtual functions from a base class. Also fix -print-stats
counting of move assignment/construction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/virtual-implicit-move-assignment.cpp')
-rw-r--r-- | test/CodeGenCXX/virtual-implicit-move-assignment.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/virtual-implicit-move-assignment.cpp b/test/CodeGenCXX/virtual-implicit-move-assignment.cpp new file mode 100644 index 0000000000..d8ac1ed4c4 --- /dev/null +++ b/test/CodeGenCXX/virtual-implicit-move-assignment.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -emit-llvm -std=c++11 -o - %s | FileCheck %s + +struct D; +struct B { + virtual D &operator=(D&&) = 0; +}; +struct D : B { D(); virtual void a(); }; +void D::a() {} +D d; + +// CHECK: @_ZTV1D = {{.*}} @_ZN1DaSEOS_ +// CHECK: define linkonce_odr {{.*}} @_ZN1DaSEOS_ |