[clangd] Add parameter renaming to define-inline code action
authorKadir Cetinkaya <kadircet@google.com>
Mon, 14 Oct 2019 10:02:24 +0000 (12:02 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Thu, 31 Oct 2019 08:23:09 +0000 (09:23 +0100)
commit71aa3f7b7e43bf7d2a8a38324b1f9f7b12bbbdfc
treedff1727b7727970c94e3afbe5633c3178507b16e
parent08c7ff99e13890ed19b864e7ebfea7167eb83842
[clangd] Add parameter renaming to define-inline code action

Summary:
When moving a function definition to declaration location we also need
to handle renaming of the both function and template parameters.

This patch achives that by making sure every parameter name and dependent type
in destination is renamed to their respective name in the source.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68937
clang-tools-extra/clangd/refactor/tweaks/DefineInline.cpp
clang-tools-extra/clangd/unittests/TweakTests.cpp