Miklos Vajna
ed28d41b1a
clang-rename: fix renaming members when referenced as macro arguments
...
The second check failed, FOO(C.X) wasn't renamed to FOO(C.Y).
Reviewers: klimek
Differential Revision: http://reviews.llvm.org/D20446
llvm-svn: 270204
2016-05-20 11:43:59 +00:00
Miklos Vajna
5a6d2985d7
clang-rename: handle non-inline ctor definitions when renaming classes
...
The result of the test was C::D(), not D::D().
Reviewers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D20356
llvm-svn: 269952
2016-05-18 16:12:48 +00:00
Miklos Vajna
a7445f1b5e
clang-rename: avoid StringRef members in USRLocFindingASTVisitor
...
Even if this is defined in the .cpp file and only used as part of the
function (so here it's safe), usually storing StringRefs in the class is
dangerous, so don't do so.
Reviewers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D20296
llvm-svn: 269796
2016-05-17 18:17:16 +00:00
Etienne Bergeron
a4bc53afba
[clang-rename] Fix broken dependency on shared build.
...
Summary:
The build is broken due to a missing dependency.
To repro: [Release + Shared]
```
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
```
Which produce this error:
```
tools/clang/tools/extra/clang-rename/CMakeFiles/clangRename.dir/USRLocFinder.cpp.o: In function `clang::RecursiveASTVisitor<clang::rename::(anonymous namespace)::USRLocFindingASTVisitor>::TraverseCXXConstructorDecl(clang::CXXConstructorDecl*)':
USRLocFinder.cpp:(.text._ZN5clang19RecursiveASTVisitorINS_6rename12_GLOBAL__N_123USRLocFindingASTVisitorEE26TraverseCXXConstructorDeclEPNS_18CXXConstructorDeclE+0x170): undefined reference to `clang::Lexer::getSourceText(clang::CharSourceRange, clang::SourceManager const&, clang::LangOptions const&, bool*)'
```
Reviewers: alexfh, yaron.keren
Subscribers: yaron.keren, cfe-commits
Differential Revision: http://reviews.llvm.org/D20240
llvm-svn: 269429
2016-05-13 15:38:54 +00:00
Miklos Vajna
1d48e50159
clang-rename: check that the source location we find actually has the old name
...
This more general check could have prevented the specific problem
"getSourceOrder() == -1" guards.
Reviewers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D20216
llvm-svn: 269402
2016-05-13 09:17:32 +00:00
Miklos Vajna
6477682c98
clang-rename: fix renaming of field with implicit initializers
...
The last check failed as Cla::Cla() was rewritten to Cla::hector().
Reviewers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D20150
llvm-svn: 269161
2016-05-11 08:08:07 +00:00
Miklos Vajna
65f088f528
clang-rename: when renaming a field, rename initializers of that field as well
...
Summary: The second check failed, the initializer wasn't renamed.
Reviewers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D19957
llvm-svn: 268857
2016-05-07 14:32:59 +00:00
Manuel Klimek
13e2c1a709
When renaming a class, ename pointers to that class as well.
...
Patch by Miklos Vajna.
llvm-svn: 268484
2016-05-04 09:45:44 +00:00
Manuel Klimek
bc5f581d47
Add missing newline in clang-rename output.
...
Patch by Miklos Vajna.
Differential Revision: http://reviews.llvm.org/D18957
llvm-svn: 267855
2016-04-28 06:46:44 +00:00
Eugene Zelenko
05f7e6ae0d
Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes.
...
Differential revision: http://reviews.llvm.org/D18231
llvm-svn: 263726
2016-03-17 17:02:25 +00:00
Chris Bieneman
2cc7fec76a
Remove autoconf support
...
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
2016-01-26 21:31:36 +00:00
Yaron Keren
40178c352e
Revert r241330. It compiled with Visual C++ 2013 and gcc 4.9.1 (mingw) but now fails the bots.
...
llvm-svn: 241335
2015-07-03 09:30:33 +00:00
Yaron Keren
452670165c
Replace some const std::string & with llvm::StringRef or std::string
...
and std::move to avoid implicit std::string construction.
Patch by Eugene Kosov.
llvm-svn: 241330
2015-07-03 09:16:20 +00:00
Richard Trieu
a60ca8104e
Change range-based for-loop to be -Wrange-loop-analysis clean.
...
No functionality change.
llvm-svn: 234965
2015-04-15 01:21:57 +00:00
Adrian Prantl
b97f5c1eb2
Revert "Adapt clang-tools-extra to clang module format changes."
...
This reverts commit 230424.
llvm-svn: 230456
2015-02-25 02:46:37 +00:00
Adrian Prantl
e95edbf5a9
Adapt clang-tools-extra to clang module format changes.
...
- add clangCodeGen.a to the tools that need it
- tweak pp-trace command line handling to not conflict with clang's.
llvm-svn: 230424
2015-02-25 01:32:04 +00:00
Adrian Prantl
a22fd38174
Revert "Adapt Makefile dependencies for the clang module format change in r230089."
...
llvm-svn: 230104
2015-02-21 00:29:43 +00:00
Adrian Prantl
6897e3e456
Adapt Makefile dependencies for the clang module format change in r230089.
...
llvm-svn: 230090
2015-02-20 23:35:07 +00:00
Chandler Carruth
3cbd71c03b
[cleanup] Re-sort the #include lines with llvm/utils/sort_includes.py
...
No functionality changed, this is just a mechanical cleanup to keep the
order of #include lines consistent across the project.
llvm-svn: 225976
2015-01-14 11:24:38 +00:00
NAKAMURA Takumi
9f99a7a417
[CMake] Prune redundant libdeps.
...
llvm-svn: 220893
2014-10-30 01:37:44 +00:00
NAKAMURA Takumi
dc872ed908
[CMake] Add dependencies on clangToolingCore.
...
llvm-svn: 220890
2014-10-30 00:44:01 +00:00
NAKAMURA Takumi
90c67e5ab4
[CMake] Reformat.
...
llvm-svn: 220888
2014-10-30 00:43:33 +00:00
Daniel Jasper
c1de000e22
Fix Makefiles after r220867.
...
llvm-svn: 220868
2014-10-29 18:55:41 +00:00
Manuel Klimek
3f840a934e
Re-structure clang-rename into a library and the tool.
...
This allows the unit tests to link the library.
Patch by Xin Huang.
llvm-svn: 219609
2014-10-13 11:30:27 +00:00
Manuel Klimek
de23726dbd
Revert rL215947: "[clang-rename] revert r215839"
...
Make tests not depend on grep supporting -bo.
llvm-svn: 216041
2014-08-20 01:39:05 +00:00
Gerolf Hoflehner
62bf7e83cb
[clang-rename] revert r215839
...
The commit broke public build bots for more than 24 hours.
(view as text)
******************** TEST 'Clang Tools :: clang-rename/VarTest.cpp' FAILED ********************
Script:
--
cat /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang.src/tools/extra/test/clang-rename/VarTest.cpp > /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp
clang-rename -offset=$(grep -FUbo 'foo;' /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp | head -1 | cut -d: -f1) -new-name=hector /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp -i --
sed 's,//.*,,' /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp | FileCheck /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang.src/tools/extra/test/clang-rename/VarTest.cpp
--
Exit Code: 1
Command Output (stderr):
--
clang-rename: could not find symbol at /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin11-nobootstrap-RAincremental/clang-build/tools/clang/tools/extra/test/clang-rename/Output/VarTest.cpp.tmp.cpp:2:1 (offset 14).
llvm-svn: 215947
2014-08-18 23:03:30 +00:00
NAKAMURA Takumi
8fad914691
[CMake] clang-rename: Optimize libdeps.
...
llvm-svn: 215935
2014-08-18 20:49:18 +00:00
NAKAMURA Takumi
d5a96a794e
Add trailing linefeed.
...
llvm-svn: 215934
2014-08-18 20:49:09 +00:00
Manuel Klimek
639557ae86
Fix link libraries for clang-rename.
...
llvm-svn: 215843
2014-08-17 18:33:24 +00:00
Manuel Klimek
52d23d4cee
Remove mention of non-existent 'test' directory.
...
llvm-svn: 215840
2014-08-17 18:17:41 +00:00
Manuel Klimek
ccf0d79724
First version of a clang-rename tool.
...
Summary:
Note that this code is still grossly under-tested - the next steps will
be to add significantly better test coverage.
Patch by Matthew Plant.
Test Plan:
Reviewers:
Subscribers:
llvm-svn: 215839
2014-08-17 18:00:59 +00:00