martong marked an inline comment as done. martong added inline comments.
================ Comment at: clang/include/clang/AST/ASTImporter.h:203 /// context, or the import error. - llvm::Expected<TypeSourceInfo *> Import_New(TypeSourceInfo *FromTSI); - // FIXME: Remove this version. - TypeSourceInfo *Import(TypeSourceInfo *FromTSI); + llvm::Expected<TypeSourceInfo *> Import(TypeSourceInfo *FromTSI); ---------------- aprantl wrote: > Wouldn't it make more sense to return `Expected<TypeSourceInfo &>`? That would not be consistent with the other changes. In this patch we change the signature of each functions similarly: From `T foo(...)` to `Expected<T> foo(...)`. Also, `TypeSourceInfo` factory functions in `ASTContext` do return with a pointer. For example: ``` TypeSourceInfo *CreateTypeSourceInfo(QualType T, unsigned Size = 0) const; /// Allocate a TypeSourceInfo where all locations have been /// initialized to a given location, which defaults to the empty /// location. TypeSourceInfo * getTrivialTypeSourceInfo(QualType T, SourceLocation Loc = SourceLocation()) const; ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61438/new/ https://reviews.llvm.org/D61438 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits