This revision was automatically updated to reflect the committed changes.
Closed by commit rL365894: [clangd] Fixed toHalfOpenFileRange (authored by
SureYeaah, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.or
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:261
+ if (!Lexer::getRawToken(Loc, TheTok, SM, LangOpts)) {
+if (TheTok.is(tok::greatergreater))
+ ret
SureYeaah added inline comments.
Comment at: clang-tools-extra/clangd/unittests/SourceCodeTests.cpp:410
+// Test for functions toHalfOpenFileRange and getHalfOpenFileRange
+// FIXME: Need better testing support to be able to check more than just Decls.
+TEST(SourceCodeTests, Half
SureYeaah updated this revision to Diff 209363.
SureYeaah marked 12 inline comments as done.
SureYeaah added a comment.
Added comments and minor changes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64562/new/
https://reviews.llvm.org/D64562
Files
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:252
-llvm::Optional toHalfOpenFileRange(const SourceManager &Mgr,
+// FIXME: Here we check whether the token at the location is a greatergreater
+// (>>) token and consider it as a single greate
sammccall added a comment.
Thanks for fixing this, this stuff is such a tangled web.
Logic seems great, so just style/test nits.
Comment at: clang-tools-extra/clangd/SourceCode.cpp:261
+ if (!Lexer::getRawToken(Loc, TheTok, SM, LangOpts)) {
+if (TheTok.is(tok::greatergrea
SureYeaah updated this revision to Diff 209193.
SureYeaah added a comment.
Minor fixes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64562/new/
https://reviews.llvm.org/D64562
Files:
clang-tools-extra/clangd/SourceCode.cpp
clang-tools-extra/cl
SureYeaah created this revision.
SureYeaah added reviewers: sammccall, kadircet.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay,
ilya-biryukov.
Herald added a project: clang.
- Fixed toHalfOpenFileRange to work for macros as well as template
instantiations
- Added unit tests