================
@@ -316,5 +319,26 @@ std::string getReturnType(const CodeCompletionString &CCS)
{
return "";
}
+comments::FullComment *parseComment(llvm::StringRef Comment,
+ llvm::BumpPtrAllocator &Allocator,
+ comments::CommandTraits &Traits) {
+ // The comment lexer expects markers, so add them back
+ auto CommentWithMarkers = "/*" + Comment.str() + "*/";
+
+ SourceManagerForFile SourceMgrForFile("mock_file.cpp", CommentWithMarkers);
+ SourceManager &SourceMgr = SourceMgrForFile.get();
+
+ comments::Lexer L(Allocator, SourceMgr.getDiagnostics(), Traits,
----------------
erichkeane wrote:
The order of these constructors seems odd. I would expect us to build these up
in the 'correct' order of dependence/execution/etc. So I think you should swap
the `Lexer` and `Sema` lines.
https://github.com/llvm/llvm-project/pull/78491
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits