This revision was automatically updated to reflect the committed changes.
Closed by commit rL373323: [clangd] Implement getBeginning for overloaded
operators. (authored by hokein, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
htt
hokein added inline comments.
Comment at: clang-tools-extra/clangd/unittests/SourceCodeTests.cpp:330
+ "/^/ comments", // non-interesting token
+ "void f(int abc) { abc ^ ++; }",// whitespace
+ "void f(int abc) { ^abc^++; }", // range of iden
hokein updated this revision to Diff 222583.
hokein marked 2 inline comments as done.
hokein added a comment.
add one more testcase.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67695/new/
https://reviews.llvm.org/D67695
Files:
clang-tools-extr
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:256
+
SourceLocation getBeginningOfIdentifier(const Position &Pos,
const SourceManager &SM,
hokein wrote:
> the function name doesn'
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
Mostly LGTM
Comment at: clang-tools-extra/clangd/SourceCode.cpp:258
+
+TokenKind getTokenKind(SourceLocation Loc, const SourceManager &SM,
+
hokein added inline comments.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:242
+
+enum TokenKind { Identifier, Operator, Whitespace, Other };
+
ilya-biryukov wrote:
> `TokenKind` has the same name as `tok::TokenKind`. Could we use a different
> name here
hokein updated this revision to Diff 222423.
hokein marked 8 inline comments as done.
hokein added a comment.
address comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67695/new/
https://reviews.llvm.org/D67695
Files:
clang-tools-extra/cla
ilya-biryukov added a comment.
Mostly NITs, except the naming of the new `TokenKind` enum.
I think it's better to pick something that's not clashing with
`clang::tok::TokenKind`, even if the enum is in a different namespace.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:
hokein added inline comments.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:286
- Before = Lexer::GetBeginningOfToken(Before, SM, LangOpts);
- Token Tok;
- if (Before.isValid() &&
- !Lexer::getRawToken(Before, Tok, SM, LangOpts, false) &&
- Tok.is(tok::raw_id
hokein updated this revision to Diff 221935.
hokein marked 2 inline comments as done.
hokein added a comment.
Simplify the logic.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67695/new/
https://reviews.llvm.org/D67695
Files:
clang-tools-extra/c
hokein updated this revision to Diff 221936.
hokein added a comment.
Upload correct diff.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67695/new/
https://reviews.llvm.org/D67695
Files:
clang-tools-extra/clangd/SourceCode.cpp
clang-tools-extra
ilya-biryukov added inline comments.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:286
- Before = Lexer::GetBeginningOfToken(Before, SM, LangOpts);
- Token Tok;
- if (Before.isValid() &&
- !Lexer::getRawToken(Before, Tok, SM, LangOpts, false) &&
- Tok.is(tok:
hokein updated this revision to Diff 221904.
hokein added a comment.
Fix a typo.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67695/new/
https://reviews.llvm.org/D67695
Files:
clang-tools-extra/clangd/SourceCode.cpp
clang-tools-extra/clangd/u
hokein updated this revision to Diff 221903.
hokein added a comment.
Rewrite the getBeignningOfIdentifier function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67695/new/
https://reviews.llvm.org/D67695
Files:
clang-tools-extra/clangd/SourceCo
hokein marked an inline comment as done.
hokein added inline comments.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:256
+
SourceLocation getBeginningOfIdentifier(const Position &Pos,
const SourceManager &SM,
the fu
hokein created this revision.
hokein added a reviewer: ilya-biryukov.
Herald added subscribers: usaxena95, kadircet, arphaman, jkorous, MaskRay.
Herald added a project: clang.
hokein marked an inline comment as done.
hokein added inline comments.
Comment at: clang-tools-extra/cla
16 matches
Mail list logo