This revision was automatically updated to reflect the committed changes. Closed by commit rC345496: [ASTImporter] Import overrides before importing the rest of the chain (authored by martong, committed by ).
Changed prior to commit: https://reviews.llvm.org/D53704?vs=171097&id=171471#toc Repository: rC Clang https://reviews.llvm.org/D53704 Files: lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp =================================================================== --- lib/AST/ASTImporter.cpp +++ lib/AST/ASTImporter.cpp @@ -3258,16 +3258,16 @@ DC->makeDeclVisibleInContext(ToFunction); } + if (auto *FromCXXMethod = dyn_cast<CXXMethodDecl>(D)) + ImportOverrides(cast<CXXMethodDecl>(ToFunction), FromCXXMethod); + // Import the rest of the chain. I.e. import all subsequent declarations. for (++RedeclIt; RedeclIt != Redecls.end(); ++RedeclIt) { ExpectedDecl ToRedeclOrErr = import(*RedeclIt); if (!ToRedeclOrErr) return ToRedeclOrErr.takeError(); } - if (auto *FromCXXMethod = dyn_cast<CXXMethodDecl>(D)) - ImportOverrides(cast<CXXMethodDecl>(ToFunction), FromCXXMethod); - return ToFunction; }
Index: lib/AST/ASTImporter.cpp =================================================================== --- lib/AST/ASTImporter.cpp +++ lib/AST/ASTImporter.cpp @@ -3258,16 +3258,16 @@ DC->makeDeclVisibleInContext(ToFunction); } + if (auto *FromCXXMethod = dyn_cast<CXXMethodDecl>(D)) + ImportOverrides(cast<CXXMethodDecl>(ToFunction), FromCXXMethod); + // Import the rest of the chain. I.e. import all subsequent declarations. for (++RedeclIt; RedeclIt != Redecls.end(); ++RedeclIt) { ExpectedDecl ToRedeclOrErr = import(*RedeclIt); if (!ToRedeclOrErr) return ToRedeclOrErr.takeError(); } - if (auto *FromCXXMethod = dyn_cast<CXXMethodDecl>(D)) - ImportOverrides(cast<CXXMethodDecl>(ToFunction), FromCXXMethod); - return ToFunction; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits