summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Make Tweak::Selection movable. NFCSam McCall2019-12-161-2/+2
|
* [clangd] Support multifile edits as output of TweaksKadir Cetinkaya2019-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: First patch for propogating multifile changes from tweak outputs to LSP WorkspaceEdits. Uses SM to convert tooling::Replacements to TextEdits. Errors out if there are any inconsistencies between the draft version and the version generated the edits. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66637 llvm-svn: 371392
* [clangd] Rename ClangdUnit.h -> ParsedAST.h. NFCSam McCall2019-09-041-1/+1
| | | | | | | | | | This much better reflects what is (now) in this header. Maybe a rename to ParsedTU would be an improvement, but that's a much more invasive change and life is too short. ClangdUnit is dead, long live ClangdUnitTests! llvm-svn: 370862
* [clangd] Add hidden tweaks to dump AST/selection.Sam McCall2019-06-181-6/+5
| | | | | | | | | | | | | | | | | | | | | | | Summary: This introduces a few new concepts: - tweaks have an Intent (they don't all advertise as refactorings) - tweaks may produce messages (for ShowMessage notification). Generalized Replacements -> Effect. - tweaks (and other features) may be hidden (clangd -hidden-features flag). We may choose to promote these one day. I'm not sure they're worth their own feature flags though. Verified it in vim-clangd (not yet open source), curious if the UI is ok in VSCode. Reviewers: ilya-biryukov Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62538 llvm-svn: 363680
* [clangd] Add SourceManager accessor to ParsedAST. NFCSam McCall2019-05-281-1/+1
| | | | llvm-svn: 361883
* Revamp the "[clangd] Format tweak's replacements"Haojian Wu2019-02-111-5/+2
| | | | | | | | | | | | | | | | | | | | Summary: This patch contains two parts: 1) reverts commit r353306. 2) move the format logic out from tweaks, keep tweaks API unchanged. Reviewers: sammccall, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58051 llvm-svn: 353712
* [clangd] Format tweak's replacements.Haojian Wu2019-02-061-2/+5
| | | | llvm-svn: 353306
* Remove trailing semicolon. NFCI.Simon Pilgrim2019-02-031-1/+1
| | | | llvm-svn: 352991
* [clangd] Expose SelectionTree to code tweaks, and use it for swap if branches.Sam McCall2019-02-011-44/+11
| | | | | | | | | | | | | | | | | Summary: This reduces the per-check implementation burden and redundant work. It also makes checks range-aware by default (treating the commonAncestor as if it were a point selection should be good baseline behavior). Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet Tags: #clang Differential Revision: https://reviews.llvm.org/D57570 llvm-svn: 352876
* [clangd] Fix crash in applyTweak, remove TweakID alias.Sam McCall2019-02-011-1/+1
| | | | | | | Strings are complicated, giving them opaque names makes us forget they're complicated. llvm-svn: 352837
* [clangd] A code action to swap branches of an if statementIlya Biryukov2019-01-311-0/+132
Reviewers: sammccall Reviewed By: sammccall Subscribers: llvm-commits, mgorny, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D56611 llvm-svn: 352796
OpenPOWER on IntegriCloud