|
@@ -6283,8 +6283,8 @@ void Sema::CheckCompletedCXXClass(CXXRecordDecl *Record) {
|
|
|
M->dropAttr<DLLExportAttr>();
|
|
|
|
|
|
if (M->hasAttr<DLLExportAttr>()) {
|
|
|
- DefineImplicitSpecialMember(*this, M, M->getLocation());
|
|
|
- ActOnFinishInlineFunctionDef(M);
|
|
|
+ // Define after any fields with in-class initializers have been parsed.
|
|
|
+ DelayedDllExportMemberFunctions.push_back(M);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -11537,6 +11537,15 @@ void Sema::ActOnFinishCXXMemberDecls() {
|
|
|
|
|
|
void Sema::ActOnFinishCXXNonNestedClass(Decl *D) {
|
|
|
referenceDLLExportedClassMethods();
|
|
|
+
|
|
|
+ if (!DelayedDllExportMemberFunctions.empty()) {
|
|
|
+ SmallVector<CXXMethodDecl*, 4> WorkList;
|
|
|
+ std::swap(DelayedDllExportMemberFunctions, WorkList);
|
|
|
+ for (CXXMethodDecl *M : WorkList) {
|
|
|
+ DefineImplicitSpecialMember(*this, M, M->getLocation());
|
|
|
+ ActOnFinishInlineFunctionDef(M);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void Sema::referenceDLLExportedClassMethods() {
|