[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-12 Thread Shaurya Gupta via Phabricator via cfe-commits
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

[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-12 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-11 Thread Shaurya Gupta via Phabricator via cfe-commits
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

[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-11 Thread Shaurya Gupta via Phabricator via cfe-commits
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

[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-11 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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

[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-11 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-11 Thread Shaurya Gupta via Phabricator via cfe-commits
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

[PATCH] D64562: [clangd] Fixed toHalfOpenFileRange

2019-07-11 Thread Shaurya Gupta via Phabricator via cfe-commits
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