[PATCH] D143112: [clang] Support parsing comments without ASTContext
Tom Praschan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 1 14:37:55 PST 2023
tom-anders added inline comments.
================
Comment at: clang/include/clang/AST/RawCommentList.h:159
+ /// Parse the \p Comment, storing the result in \p Allocator
+ static comments::FullComment *parse(llvm::StringRef Comment,
+ llvm::BumpPtrAllocator &Allocator,
----------------
Not sure if this is the right place for this? Could be moved to `FullComment` or made a free function instead?
================
Comment at: clang/lib/AST/RawCommentList.cpp:227
+ SourceMgr.getLocForStartOfFile(SourceMgr.getMainFileID()),
+ Allocator, SourceMgr.getDiagnostics(), Traits);
+}
----------------
I wasn't sure if it's worth making the `Diagnostics` parameter optional here - Our `SourceMgr` already has it anyway, does it impact performance significantly to use it, even though we don't need it (yet)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143112/new/
https://reviews.llvm.org/D143112
More information about the cfe-commits
mailing list