a.sidorin added a comment. Hi Gabor!
I like the change but there are also some questions. ================ Comment at: lib/AST/ASTImporter.cpp:1659 + AccessSpecDecl *ToD; + std::tie(ToD, AlreadyImported) = CreateDecl<AccessSpecDecl>( + D, Importer.getToContext(), D->getAccess(), DC, Loc, ColonLoc); ---------------- As I see, all usage samples require having a variable AlreadyImported used only once. How about changing the signature a bit: ```bool getOrCreateDecl(ToDeclTy *&ToD, FromDeclT *FromD, Args &&... args)``` with optional `LLVM_NODISCARD`? (Naming is a subject for discussion). This signature also allows us to omit template arguments because we pass an argument of a templated type. So, the call will look like this: ```AccessSpecDecl *ToD; if (getOrCreateDecl(ToD, D, Importer.getToContext(), D->getAccess(), DC, Loc, ColonLoc)) return ToD;``` ================ Comment at: lib/AST/ASTImporter.cpp:1922 if (auto *FoundAlias = dyn_cast<TypeAliasTemplateDecl>(FoundDecl)) - return Importer.Imported(D, FoundAlias); + return Importer.MapImported(D, FoundAlias); ConflictingDecls.push_back(FoundDecl); ---------------- Could you also fix indentation here? Repository: rC Clang https://reviews.llvm.org/D47632 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits