llvm-project/clang-tools-extra/clangd/refactor
Sam McCall 1aaef90c2a [clangd] Disallow extraction of expression-statements.
Summary:
I split out the "extract parent instead of this" logic from the "this isn't
worth extracting" logic (now in eligibleForExtraction()), because I found it
hard to reason about.

While here, handle overloaded as well as builtin assignment operators.

Also this uncovered a bug in getCallExpr() which I fixed.

Reviewers: SureYeaah

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65337

llvm-svn: 368500
2019-08-09 23:40:54 +00:00
..
tweaks [clangd] Disallow extraction of expression-statements. 2019-08-09 23:40:54 +00:00
Rename.cpp [clangd] Use raw rename functions to implement the rename. 2019-08-09 10:55:22 +00:00
Rename.h [clangd] Narrow rename to local symbols. 2019-06-25 08:43:17 +00:00
Tweak.cpp [clangd] Ignore semicolons, whitespace, and comments in SelectionTree. 2019-07-31 17:52:40 +00:00
Tweak.h [Clangd] Changed ExtractVariable to only work on non empty selections 2019-07-18 15:38:03 +00:00