This revision was automatically updated to reflect the committed changes.
Closed by commit rL332458: [AST] Added a helper to extract a user-friendly text
of a comment. (authored by ibiryukov, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
lgtm
Comment at: include/clang/AST/RawCommentList.h:138
+ /// the overload with ASTContext in the rest of the code.
+ std::string getFormattedText(const SourceManager &Sour
ilya-biryukov updated this revision to Diff 146757.
ilya-biryukov added a comment.
- Removed the overload that accepts ASTContext
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AST/RawCommentList.h
lib/AST/CommentLexer.cpp
l
ilya-biryukov added inline comments.
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;
--
ilya-biryukov updated this revision to Diff 146326.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- Simplify test code with SourceManagerForFile.
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AS
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
ilya-biryukov updated this revision to Diff 145691.
ilya-biryukov added a comment.
- Fixed infinite loop with comments that contain doxygen commands
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AST/RawCommentList.h
lib/AST/C
ilya-biryukov added inline comments.
Comment at: lib/AST/RawCommentList.cpp:376
+SourceMgr.getSpellingColumnNumber(Tok.getLocation(), &LocInvalid);
+if (LocInvalid)
+ TokColumn = 0;
ioeric wrote:
> This is a bit confusing... Could you please add
ilya-biryukov updated this revision to Diff 145683.
ilya-biryukov marked 3 inline comments as done.
ilya-biryukov added a comment.
Herald added a subscriber: mgorny.
- Move unit tests from clangd code to AST tests
- Assert locations are valid
- Address review other comments
Repository:
rC Clan
ioeric added a comment.
Looks good. We still need tests though :)
Comment at: lib/AST/RawCommentList.cpp:376
+SourceMgr.getSpellingColumnNumber(Tok.getLocation(), &LocInvalid);
+if (LocInvalid)
+ TokColumn = 0;
This is a bit confusing... Could
ilya-biryukov marked 4 inline comments as done.
ilya-biryukov added inline comments.
Comment at: include/clang/AST/RawCommentList.h:118
+ /// // Parts of it might be indented.
+ /// /* The comments styles might be mixed. */
+ /// into
ioeric wrote:
ilya-biryukov updated this revision to Diff 144083.
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added a comment.
- Remove tryLexCommands(), call into helper that parses commands directly
- Addressed other review comments
Repository:
rC Clang
https://reviews.llvm.org/D46000
ioeric added inline comments.
Comment at: include/clang/AST/RawCommentList.h:118
+ /// // Parts of it might be indented.
+ /// /* The comments styles might be mixed. */
+ /// into
I'm trying to understand how these cases and RawComment work.
For t
ilya-biryukov added inline comments.
Comment at: lib/AST/RawCommentList.cpp:380
+SourceMgr.getSpellingColumnNumber(Tok.getLocation(), &LocInvalid);
+if (LocInvalid)
+ TokColumn = 0;
ilya-biryukov wrote:
> ioeric wrote:
> > Explain when this would
ilya-biryukov updated this revision to Diff 143930.
ilya-biryukov added a comment.
- Fix indentation
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AST/RawCommentList.h
lib/AST/CommentLexer.cpp
lib/AST/RawCommentList.cpp
In
ilya-biryukov updated this revision to Diff 143929.
ilya-biryukov added a comment.
- Update a comment after latest changes
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AST/RawCommentList.h
lib/AST/CommentLexer.cpp
lib/AST/
ilya-biryukov added inline comments.
Comment at: lib/AST/CommentLexer.cpp:471
+ case '\r':
+TokenPtr = skipNewline(TokenPtr, CommentEnd);
+formTokenWithChars(T, TokenPtr, tok::newline);
ioeric wrote:
> Can we share code with `lexCommentTextWi
ilya-biryukov updated this revision to Diff 143928.
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
- Attempt to reuse lexing code with/without command parsing.
- Get rid of SkipWs.
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST
ilya-biryukov added a comment.
In https://reviews.llvm.org/D46000#1077926, @ioeric wrote:
> Overall looks good. Could you add tests for the new methods?
Sure. There are a few tests in https://reviews.llvm.org/D46002, but I haven't
(yet) moved them to clang.
Repository:
rC Clang
https://re
ioeric added a comment.
Overall looks good. Could you add tests for the new methods?
Comment at: lib/AST/CommentLexer.cpp:294
void Lexer::lexCommentText(Token &T) {
+ if (ParseCommands)
+lexCommentTextWithCommands(T);
micro-nit: I'd probably
```
return Pa
ilya-biryukov updated this revision to Diff 143881.
ilya-biryukov added a comment.
Added forgotten bits of the change
Repository:
rC Clang
https://reviews.llvm.org/D46000
Files:
include/clang/AST/CommentLexer.h
include/clang/AST/RawCommentList.h
lib/AST/CommentLexer.cpp
lib/AST/RawCo
ilya-biryukov created this revision.
ilya-biryukov added reviewers: sammccall, hokein, ioeric.
The helper is used in clangd for documentation shown in code completion
and storing the docs in the symbols. See https://reviews.llvm.org/D45999.
This patch reuses the code of the Doxygen comment lexer,
22 matches
Mail list logo