Eli says this should check MicrosoftMode instead.

Also change a || that I accidentally changed to && back to ||.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nico Weber 2012-01-23 04:01:33 +00:00
Родитель afcc96a200
Коммит 28976604ff
3 изменённых файлов: 24 добавлений и 26 удалений

Просмотреть файл

@ -7852,8 +7852,8 @@ CXXMethodDecl *Sema::DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl) {
// there is no user-declared move assignment operator, a copy assignment
// operator is implicitly declared as defaulted.
if ((ClassDecl->hasUserDeclaredMoveConstructor() &&
!getLangOptions().MicrosoftExt) ||
ClassDecl->hasUserDeclaredMoveAssignment() &&
!getLangOptions().MicrosoftMode) ||
ClassDecl->hasUserDeclaredMoveAssignment() ||
ShouldDeleteCopyAssignmentOperator(CopyAssignment))
CopyAssignment->setDeletedAsWritten();
@ -8758,7 +8758,7 @@ CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor(
// declared as defaulted.
if (ClassDecl->hasUserDeclaredMoveConstructor() ||
(ClassDecl->hasUserDeclaredMoveAssignment() &&
!getLangOptions().MicrosoftExt) ||
!getLangOptions().MicrosoftMode) ||
ShouldDeleteSpecialMember(CopyConstructor, CXXCopyConstructor))
CopyConstructor->setDeletedAsWritten();

Просмотреть файл

@ -68,7 +68,28 @@ int jump_over_indirect_goto() {
}
namespace PR11826 {
struct pair {
pair(int v) { }
void operator=(pair&& rhs) { }
};
void f() {
pair p0(3);
pair p = p0;
}
}
namespace PR11826_for_symmetry {
struct pair {
pair(int v) { }
pair(pair&& rhs) { }
};
void f() {
pair p0(3);
pair p(4);
p = p0;
}
}
namespace ms_using_declaration_bug {

Просмотреть файл

@ -6,26 +6,3 @@ struct A {
};
int b = 3;
A var = { b }; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
namespace PR11826 {
struct pair {
pair(int v) { }
void operator=(pair&& rhs) { }
};
void f() {
pair p0(3);
pair p = p0;
}
}
namespace PR11826_for_symmetry {
struct pair {
pair(int v) { }
pair(pair&& rhs) { }
};
void f() {
pair p0(3);
pair p(4);
p = p0;
}
}