Index: lib/AST/ASTImporter.cpp =================================================================== --- lib/AST/ASTImporter.cpp +++ lib/AST/ASTImporter.cpp @@ -3258,6 +3258,9 @@ DC->makeDeclVisibleInContext(ToFunction); } + if (auto *FromCXXMethod = dyn_cast(D)) + ImportOverrides(cast(ToFunction), FromCXXMethod); + // Import the rest of the chain. I.e. import all subsequent declarations. for (++RedeclIt; RedeclIt != Redecls.end(); ++RedeclIt) { ExpectedDecl ToRedeclOrErr = import(*RedeclIt); @@ -3265,9 +3268,6 @@ return ToRedeclOrErr.takeError(); } - if (auto *FromCXXMethod = dyn_cast(D)) - ImportOverrides(cast(ToFunction), FromCXXMethod); - return ToFunction; }