| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The core engine of clang-rename will be used for local and global renames in the
new refactoring engine, as mentioned in
http://lists.llvm.org/pipermail/cfe-dev/2017-June/054286.html.
The clang-rename tool is still supported but might get deprecated in the future.
Differential Revision: https://reviews.llvm.org/D34696
llvm-svn: 306840
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The use-case is when renaming a widely used name, like a lower-level
class in a codebase and clang-rename is simply invoked for each
translation unit based on the compile database. In this case it's not
interesting to show errors: not finding the symbol means there is
simply nothing to do.
Reviewers: klimek
Reviewed By: klimek
Differential Revision: https://reviews.llvm.org/D32403
llvm-svn: 304534
|
|
|
|
|
|
|
|
| |
Emacs 24 doesn't have format-message, fall back to format in that case.
Patch by Philipp Stephani.
llvm-svn: 283861
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use lexical binding, as recommended for new libraries.
* Fix customization variable (set correct group and type).
* Create a new customization group for the library.
* Autoload the main clang-rename command so that users don't have to explicitly load the library.
* Correctly translate between file and buffer positions using bufferpos-to-filepos (if available) or a fallback.
* Don't invoke the shell, it's not necessary and adds complexity.
* Save clang-rename output in a buffer and display that on failure.
* Save all buffers before calling clang-rename. This is required anyway and prevents data loss when the buffer is later reverted.
* In revert-buffer, use keywords instead of t for Boolean arguments to improve readability.
* Don't reset buffer modes when reverting.
* Emacs treats the character after a symbol as part of the symbol, while clang-rename doesn't; resolve this inconsistency.
* Formatting.
Patch by Philipp Stephani!
Reviewers: omtcyfz
Differential Revision: https://reviews.llvm.org/D25156
llvm-svn: 283067
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-rename
After applying `clang-rename` to a vim buffer (using `clang-rename.py` as part
of the vim integration) the buffer gets reloaded using `bufdo`. This solution is
suboptimal, since syntax highlighting is turned off for performance reasons and
never turned on, after all changes to the source file have been applied.
A better solution to this is using `checktime`. It is exactly designed for this
kind of task and doesn't have the syntax highlighting issue.
Patch by Kai Wolf!
Reviewers: omtcyfz
Differential Revision: https://reviews.llvm.org/D24791
llvm-svn: 282388
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the output of clang-rename for the files without modifications.
Update the code in clang-reorder-fields/tool/ClangReorderFields.cpp
to avoid inconsistency.
Example:
a.h:
struct A {};
a.cpp:
#include "a.h"
int main() { return 0; }
Before the changes the output looks like this:
clang-rename -qualified-name=A -new-name=B a.cpp
<<<<<INVALID SOURCE LOCATION>>>>>
Test plan: make -j8 check-clang-tools
Differential revision: https://reviews.llvm.org/D24634
llvm-svn: 281826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having both rename-at and rename-all both seems confusing and introduces
unneeded difficulties. After merging rename-at and rename-all maintaining main
function wrappers and custom help becomes redundant while CLI becomes less
confusing.
D24224 (which was the original patch causing buildbot failures) wasn't aware of
bugs caused by passing both -offset and -qualified-name. After D24224 was landed
it caused buildbot failures and therefor I just reverted it.
Two things that make this patch different from D24224 are:
* unittests/clang-rename was deleted, because it is unmaintained and doesn't do
much.
* Passing both `-offset` and `-qualified-name` isn't allowed anymore for the
sake of preventing bugs.
This patch is a trivial enhancement of accepted D24224 revision.
Tested with `ninja check-all`.
Differential Revision: https://reviews.llvm.org/D24567
llvm-svn: 281710
|
|
|
|
| |
llvm-svn: 281459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having both rename-at and rename-all both seems confusing and introduces
unneeded difficulties. Allowing to use both -qualified-name and -offset at once
while performing efficient renamings seems like a feature, too. Maintaining main
function wrappers and custom help becomes redundant while CLI becomes less
confusing.
Reviewers: alexfh
Differential Revision: https://reviews.llvm.org/D24224
llvm-svn: 281456
|
|
|
|
| |
llvm-svn: 279226
|
|
|
|
| |
llvm-svn: 278201
|
|
|
|
|
|
|
|
|
|
|
| |
This is handy in case by the time clang-rename is invoked, an external
tool already genereated a list of oldname -> newname pairs to handle.
Reviewers: omtcyfz
Differential Revision: https://reviews.llvm.org/D23198
llvm-svn: 278145
|
|
|
|
|
|
|
|
| |
r277702 introduced clang-format changes so that later commits wouldn't introduce
non-functional changes while running clang-format before commiting. Though,
few changes by clang-format weren't in the patch.
llvm-svn: 277709
|
|
|
|
| |
llvm-svn: 277491
|
|
|
|
|
|
| |
Clang-rename Emacs integration script sometimes doesn't work correctly.
llvm-svn: 277469
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- rename-at is meant to be integrated with editors and works mainly off
of a location in a file, and this is the default
- rename-all is optimized for one or more oldname->newname renames, and
works with clang-apply-replacements
Reviewers: bkramer, klimek
Subscribers: omtcyfz
Differential Revision: https://reviews.llvm.org/D21814
llvm-svn: 277438
|
|
|
|
|
|
|
|
|
|
| |
This patch aims to add very basic Emacs integration.
Reviewers: hokein, alexfh
Differential Revision: https://reviews.llvm.org/D23006
llvm-svn: 277433
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: See http://reviews.llvm.org/D21748 for details.
Reviewers: djasper, klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D21749
llvm-svn: 277336
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change Vim key binding for include-fixer (`,cf` -> `<leader>cf`) and
clang-rename (`,cr` -> `<leader>cr`) to use `<leader>` instead of `,` like
cool Vim people (tm) do.
Reviewers: ioeric
Differential Revision: https://reviews.llvm.org/D22854
llvm-svn: 276870
|
|
|
|
|
|
|
|
| |
Also fixed some Include What You Use Warnings.
Differential revision: https://reviews.llvm.org/D22654
llvm-svn: 276684
|
|
|
|
| |
llvm-svn: 276259
|
|
|
|
| |
llvm-svn: 275943
|
|
|
|
| |
llvm-svn: 275550
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does the following:
* enforces proper formatting for few files (i.e. deals with 80 linewidth violations and few other things)
* ensures '\n' chars are passed to the output streams instead of "\n" strings
* fixes a bug caused by calling cl::PrintHelpMessage(), which occasionally calls exit(0), so that exit(1) (which is right after cl::PrintHelpMessage line) becomes dead code
Patch by Kirill Bobyrev!
Differential Revision: http://reviews.llvm.org/D22091
llvm-svn: 275387
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by Kirill Bobyrev!
Reviewers: kimgr, alexfh, bkramer, ioeric, hokein
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D22100
llvm-svn: 274839
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces basic Vim integration for clang-rename tool.
For setup reference see clang-rename/tool/clang-rename.py
Patch by Kirill Bobyrev!
Differential revision: http://reviews.llvm.org/D22087
llvm-svn: 274759
|
|
|
|
| |
llvm-svn: 273993
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use case: a class is declared in a header, and defined in two
translation units. clang-rename is asked to rename a class member that's
referenced in both translation units.
Using -i is not possible, as in case the first clang-rename invocation
touches the header, the second invocation will result in compilation
errors. Using -export-fixes handles this situation, each invocation can
work on the original source, and at the end the user can apply the
replacements with clang-apply-replacements.
Reviewers: klimek
Differential Revision: http://reviews.llvm.org/D21676
llvm-svn: 273910
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to -offset with the following differences:
1) -offset can refer to local variables as well.
2) -old-name makes it easier to refer to e.g. ClassName::MemberName by
spelling out the fully qualified name, instead of having to use e.g.
grep to look up the exact offset.
In other words, -offset is great when clang-rename is invoked by e.g. an
IDE, but not really user-friendly when the tool is invoked by the user
from commandline. That's the use case where -old-name is supposed to
improve the situation.
Reviewers: klimek
Differential Revision: http://reviews.llvm.org/D21517
llvm-svn: 273304
|
|
|
|
|
|
|
|
| |
Patch by Miklos Vajna.
Differential Revision: http://reviews.llvm.org/D18957
llvm-svn: 267855
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D18231
llvm-svn: 263726
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"Now I am become Death, the destroyer of worlds."
-J. Robert Oppenheimer
Reviewers: chandlerc, grosbach, bob.wilson, echristo
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D16475
llvm-svn: 258864
|
|
|
|
|
|
| |
This reverts commit 230424.
llvm-svn: 230456
|
|
|
|
|
|
|
| |
- add clangCodeGen.a to the tools that need it
- tweak pp-trace command line handling to not conflict with clang's.
llvm-svn: 230424
|
|
|
|
|
|
| |
r230089."
llvm-svn: 230104
|
|
|
|
| |
llvm-svn: 230090
|
|
|
|
|
|
|
| |
No functionality changed, this is just a mechanical cleanup to keep the
order of #include lines consistent across the project.
llvm-svn: 225976
|
|
|
|
| |
llvm-svn: 220893
|
|
|
|
| |
llvm-svn: 220888
|
|
|
|
| |
llvm-svn: 220868
|
|
This allows the unit tests to link the library.
Patch by Xin Huang.
llvm-svn: 219609
|