summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/change-namespace/tool
Commit message (Collapse)AuthorAgeFilesLines
* Rename directory housing clang-change-namespace to be eponymousNico Weber2019-03-152-202/+0
| | | | | | | | | Makes the name of this directory consistent with the names of the other directories in clang-tools-extra. Differential Revision: https://reviews.llvm.org/D59382 llvm-svn: 356254
* Fix file headers. NFCFangrui Song2019-03-011-1/+1
| | | | llvm-svn: 355188
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Add explicit dependency on clangSerialization after rC348911Fangrui Song2018-12-121-0/+1
| | | | llvm-svn: 348916
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
* [change-namespace] trying to fix windows buildbot failure.Eric Liu2017-02-281-2/+5
| | | | llvm-svn: 296458
* [change-namespace] fix asan failure in r296110.Eric Liu2017-02-241-8/+9
| | | | llvm-svn: 296113
* [change-namepsace] make it possible to whitelist symbols so they don't get ↵Eric Liu2017-02-241-1/+28
| | | | | | | | | | | | | | updated. Reviewers: hokein Reviewed By: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30328 llvm-svn: 296110
* [change-namespace] add an option to dump changed files in YAML.Eric Liu2017-02-131-2/+35
| | | | | | | | | | | | Reviewers: hokein Reviewed By: hokein Subscribers: fhahn, cfe-commits Differential Revision: https://reviews.llvm.org/D29893 llvm-svn: 294969
* Print stack trace for clang-change-namespace tool.Eric Liu2016-10-131-0/+2
| | | | llvm-svn: 284147
* [change-namespace] Pass Style to ChangeNamespaceTool.Haojian Wu2016-10-051-1/+1
| | | | llvm-svn: 283338
* clang-change-namespace: Update libdeps.NAKAMURA Takumi2016-09-201-0/+5
| | | | | FIXME: It seems clangFormat is not referred. llvm-svn: 281954
* Add missing dependency to change-namespace.Eric Liu2016-09-192-0/+2
| | | | llvm-svn: 281935
* A clang tool for changing surrouding namespaces of class/function definitions.Eric Liu2016-09-192-0/+128
Summary: A tool for changing surrouding namespaces of class/function definitions while keeping references to types in the changed namespace correctly qualified by prepending namespace specifiers before them. Example: test.cc namespace na { class X {}; namespace nb { class Y { X x; }; } // namespace nb } // namespace na To move the definition of class Y from namespace "na::nb" to "x::y", run: clang-change-namespace --old_namespace "na::nb" \ --new_namespace "x::y" --file_pattern "test.cc" test.cc -- Output: namespace na { class X {}; } // namespace na namespace x { namespace y { class Y { na::X x; }; } // namespace y } // namespace x Reviewers: alexfh, omtcyfz, hokein Subscribers: mgorny, klimek, djasper, beanz, alexshap, Eugene.Zelenko, cfe-commits Differential Revision: https://reviews.llvm.org/D24183 llvm-svn: 281918
OpenPOWER on IntegriCloud