ioeric added a comment. Thanks for adding the tests!
================ Comment at: include/clang/AST/RawCommentList.h:138 + /// the overload with ASTContext in the rest of the code. + std::string getFormattedText(const SourceManager &SourceMgr, + DiagnosticsEngine &Diags) const; ---------------- I think we can get rid of the interface that takes `ASTContext`? If `SourceManager` and `Diags` are sufficient, I don't see why we would want another interface for ASTContext. ================ Comment at: lib/AST/RawCommentList.cpp:352 + // comments::Lexer. Therefore, we just use default-constructed options. + CommentOptions DefOpts; + comments::CommandTraits EmptyTraits(Allocator, DefOpts); ---------------- I'm not quite sure about this. Could we just require a `CommandTraits` in the interface? And only make this assumption in tests? ================ Comment at: unittests/AST/CommentTextTest.cpp:32 + std::string formatComment(llvm::StringRef CommentText) { + llvm::IntrusiveRefCntPtr<vfs::InMemoryFileSystem> EmptyFS( + new vfs::InMemoryFileSystem); ---------------- `SourceManagerForFile` added in D46176 should save you a few lines here. (I'm landing it right now...) Repository: rC Clang https://reviews.llvm.org/D46000 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits