[PATCH] D66933: [ASTImporter] Propagate errors during import of overridden methods.

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 29 05:28:26 PDT 2019


martong accepted this revision.
martong added a reviewer: a_sidorin.
martong added a comment.
This revision is now accepted and ready to land.

LGTM, other than a few comments.



================
Comment at: clang/lib/AST/ASTImporter.cpp:7809
 
-void ASTNodeImporter::ImportOverrides(CXXMethodDecl *ToMethod,
-                                      CXXMethodDecl *FromMethod) {
+Error ASTNodeImporter::ImportOverrides(CXXMethodDecl *ToMethod,
+                                       CXXMethodDecl *FromMethod) {
----------------
I think this is the time to change the name of this function. In fact, we import the overridden methods and not the ones which override this function.
So, I suggest this rename: `ImportOverrides` -> `ImportOverriddenMethods`


================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:5222
+  EXPECT_EQ(OptErr->Error, ImportError::UnsupportedConstruct);
+  EXPECT_FALSE(Import(FromFooB, Lang_CXX11));
+  EXPECT_FALSE(Import(FromFooC, Lang_CXX11));
----------------
Perhaps we should check the error here is UnsupportedConstruct too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66933/new/

https://reviews.llvm.org/D66933





More information about the cfe-commits mailing list