balazske added inline comments.
================ Comment at: clang/lib/AST/ASTImporter.cpp:8043 + + Error VisitFunctionTypeLoc(FunctionTypeLoc From) { + auto To = ToL.castAs<FunctionTypeLoc>(); ---------------- martong wrote: > a_sidorin wrote: > > Does this import interacts well with type loc import partially done at > > L3258 (VisitFunctionDecl)? Should we merge them? > I think we should check here whether the given ParmVarDecl had been imported > previously and if yes then set that with `setParam`, otherwise it could be > set to a nullptr. @balazske what do you think? Probably we could get the `FunctionTypeLoc` from `TInfo` (this is the first TypeLoc there?) and set the parameters (that are set to nullptr at line 8055), at this loop in `VisitFunctionDecl`: ``` // Set the parameters. for (auto *Param : Parameters) { Param->setOwningFunction(ToFunction); ToFunction->addDeclInternal(Param); } ToFunction->setParams(Parameters); ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71018/new/ https://reviews.llvm.org/D71018 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits