зеркало из https://github.com/microsoft/clang-1.git
Make sure to call AddOverriddenMethods for implicit copy assignment operators;
it's rare, but possible, for the difference to be significant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90301 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
2968442603
Коммит
ca6affd016
|
@ -2149,6 +2149,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
|
|||
// Don't call addedAssignmentOperator. There is no way to distinguish an
|
||||
// implicit from an explicit assignment operator.
|
||||
ClassDecl->addDecl(CopyAssignment);
|
||||
AddOverriddenMethods(ClassDecl, CopyAssignment);
|
||||
}
|
||||
|
||||
if (!ClassDecl->hasUserDeclaredDestructor()) {
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// RUN: clang-cc -emit-llvm -o - %s | FileCheck %s
|
||||
|
||||
struct D;
|
||||
struct B {
|
||||
virtual D& operator = (const D&);
|
||||
};
|
||||
struct D : B { D(); virtual void a(); };
|
||||
void D::a() {}
|
||||
|
||||
// CHECK: @_ZTV1D = {{.*}} @_ZN1DaSERKS_
|
Загрузка…
Ссылка в новой задаче