This revision was automatically updated to reflect the committed changes.
Closed by commit rG3755039c99d8: [clangd] Get rid of getTokenRange helper
(authored by kadircet).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75474/new/
https://reviews.llvm
kadircet updated this revision to Diff 247861.
kadircet marked 3 inline comments as done.
kadircet added a comment.
- Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75474/new/
https://reviews.llvm.org/D75474
Files:
clang-tools-ex
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clang-tools-extra/clangd/XRefs.cpp:170
+ // outside the main file.
+ L.range = halfOpenToRange(
+ SM, CharSourceRange::getCharRange(
kadircet updated this revision to Diff 247849.
kadircet marked 8 inline comments as done.
kadircet added a comment.
- Use getFileLoc instead of spelledForExpanded
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75474/new/
https://reviews.llvm.org/D75
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/XRefs.cpp:155
const SourceManager &SourceMgr = AST.getSourceManager();
- const FileEntry *F =
SourceMgr.getFileEntryForID(SourceMgr.getFileID(TokLoc));
+ auto Tok = syntax::tokenize(syntax::FileRange(Sourc
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/XRefs.cpp:155
const SourceManager &SourceMgr = AST.getSourceManager();
- const FileEntry *F =
SourceMgr.getFileEntryForID(SourceMgr.getFileID(TokLoc));
+ auto Tok = syntax::tokenize(syntax::FileRange(Sour
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/Hover.cpp:542
+ CharSourceRange HighlightRange =
+ TokensTouchingCursor.front().range(SM).toCharRange(SM);
llvm::Optional HI;
nit: back() would fit better with the biases elsewhere
=
kadircet updated this revision to Diff 247808.
kadircet added a comment.
- Also get rid of the call in collectmacros by using clang::Token's endlocation
instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75474/new/
https://reviews.llvm.org/D75
kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay,
ilya-biryukov, mgorny.
Herald added a project: clang.
kadircet added a parent revision: D75447: [clangd] Make use of token buffers in
semantic highli