[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-07-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365331: [clangd] A code tweak to expand a macro (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-07-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExpandMacro.cpp:57 + if (It == Spelled.begin()) +return Spelled.end(); + // Check the token we found actually touches the cursor position. sammccall wrote: > it's

[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-07-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 208425. ilya-biryukov marked 5 inline comments as done. ilya-biryukov added a comment. - Replace bsearch with partition_point. - Include macro name in the title. - Added a FIXME for empty selection case. - Return null when no token is found.

[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-07-01 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/refactor/tweaks/ExpandMacro.cpp:57 + if (It == Spelled.begin()) +return Spelled.end(); + // Check the token we found

[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-06-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 206388. ilya-biryukov added a comment. - Rebase - Update some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61681/new/ https://reviews.llvm.org/D61681 Files:

[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-06-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 203358. ilya-biryukov added a comment. - Move logically separate parts to other changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61681/new/ https://reviews.llvm.org/D61681 Files:

[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-05-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This actually works, but still far from landing. Notable problems: - this adds a dependency on `TokenBuffer`, so we need to land it first. - this change is too big, planning to split into multiple changes: (1) collecting tokens when building the AST for clangd,

[PATCH] D61681: [clangd] A code tweak to expand a macro

2019-05-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny. Herald added a project: clang. ilya-biryukov added a parent revision: D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library. Repository: rG LLVM Github Monorepo