This revision was automatically updated to reflect the committed changes.
Closed by commit rL327129: [clangd] Use identifier range as the definition
range. (authored by hokein, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D44247?vs=1
This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE327129: [clangd] Use identifier range as the definition
range. (authored by hokein, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D44247?vs=137720&id=137736#toc
Repository:
rL L
hokein added a comment.
Thanks for the comments!
Comment at: clangd/SourceCode.cpp:55
+ const auto& SM = D->getASTContext().getSourceManager();
+ SourceLocation SpellingLoc = SM.getSpellingLoc(D->getLocation());
+ if (D->getLocation().isMacroID()) {
sammccal
hokein updated this revision to Diff 137720.
hokein marked 7 inline comments as done.
hokein added a comment.
Herald added a subscriber: mgorny.
Address review comments.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44247
Files:
clangd/AST.cpp
clangd/AST.h
clangd/CMakeLi
malaperle added a comment.
In https://reviews.llvm.org/D44247#1031429, @sammccall wrote:
> In https://reviews.llvm.org/D44247#1031366, @sammccall wrote:
>
> > In https://reviews.llvm.org/D44247#1031345, @malaperle wrote:
> >
> > > I was going to change the symbol index to do the opposite :) The r
sammccall added a comment.
In https://reviews.llvm.org/D44247#1031366, @sammccall wrote:
> In https://reviews.llvm.org/D44247#1031345, @malaperle wrote:
>
> > I was going to change the symbol index to do the opposite :) The range of
> > definitions including the bodies of functions, etc is used
sammccall added a comment.
In https://reviews.llvm.org/D44247#1031345, @malaperle wrote:
> I was going to change the symbol index to do the opposite :) The range of
> definitions including the bodies of functions, etc is used in a "peek
> definition" feature by several LSP clients. So for examp
sammccall added inline comments.
Comment at: clangd/SourceCode.cpp:55
+ const auto& SM = D->getASTContext().getSourceManager();
+ SourceLocation SpellingLoc = SM.getSpellingLoc(D->getLocation());
+ if (D->getLocation().isMacroID()) {
As discussed offline, this
malaperle added a comment.
I was going to change the symbol index to do the opposite :) The range of
definitions including the bodies of functions, etc is used in a "peek
definition" feature by several LSP clients. So for example in VSCode, you can
hold Ctrl and hover on a function call and see
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, klimek.
This also matches the range in symbol index.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44247
Files:
clangd/SourceCode.cpp
clangd/So
10 matches
Mail list logo