[MS ABI] Import move assignment operators
MSVC 2015 changed behavior from 2013; it imports move assignment
operators.
llvm-svn: 236966
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 8599a02..baa05c3 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -4791,16 +4791,16 @@
if (MD->isDeleted())
continue;
- if (MD->isMoveAssignmentOperator() && ClassImported && MD->isInlined()) {
- // Current MSVC versions don't export the move assignment operators, so
- // don't attempt to import them if we have a definition.
- continue;
- }
-
- if (MD->isInlined() &&
- !S.Context.getTargetInfo().getCXXABI().isMicrosoft()) {
+ if (MD->isInlined()) {
// MinGW does not import or export inline methods.
- continue;
+ if (!S.Context.getTargetInfo().getCXXABI().isMicrosoft())
+ continue;
+
+ // MSVC versions before 2015 don't export the move assignment operators,
+ // so don't attempt to import them if we have a definition.
+ if (ClassImported && MD->isMoveAssignmentOperator() &&
+ !S.getLangOpts().isCompatibleWithMSVC(19))
+ continue;
}
}