[PATCH] D59692: [ASTImporter] Fix name conflict handling

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 05:34:01 PDT 2019


martong marked 5 inline comments as done.
martong added inline comments.


================
Comment at: lib/AST/ASTImporter.cpp:2260
 
       ConflictingDecls.push_back(FoundDecl);
     }
----------------
a_sidorin wrote:
> Do we push the same decl twice?
Uhh, thanks, that is rebase error I've made.


================
Comment at: lib/AST/ASTImporter.cpp:8532
                                                 unsigned NumDecls) {
-  return Name;
+  return DeclarationName();
 }
----------------
a_sidorin wrote:
> Empty DeclarationName can be valid sometimes. Should we return ErrorOr<DeclarationName> instead? This can also simplify caller code a bit.
That's a good idea, thanks.
Though, I'd use Expected<T> rather, that would be more consistent with the rest of the code. 


Repository:
  rC Clang

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

https://reviews.llvm.org/D59692





More information about the cfe-commits mailing list