[PATCH] D56936: Fix handling of overriden methods during ASTImport
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 24 00:05:05 PST 2019
balazske added inline comments.
================
Comment at: lib/AST/ASTImporter.cpp:2950
+ExpectedStmt ASTNodeImporter::ImportFunctionDeclBody( FunctionDecl *FromFD, FunctionDecl *ToFD ) {
+ if (Stmt *FromBody = FromFD->getBody()) {
----------------
It would be better to return `Error` instead of `Expected`. The return value (Stmt*) is not used and it may be nullptr if the `FromFD` does not have a body.
================
Comment at: lib/AST/ASTImporter.cpp:2959
+}
+
ExpectedDecl ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {
----------------
Code formatting is not OK in this function (and other places). (Indentation and spaces around "(" ")".)
================
Comment at: unittests/AST/ASTImporterTest.cpp:2311
+ auto DFP =
+ cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("D"))), unless(isDefinition()) );
+
----------------
This line is too long. clang-format can be used to format the code automatically (or git-clang-format).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56936/new/
https://reviews.llvm.org/D56936
More information about the cfe-commits
mailing list