From f68f0cd35f2f8cf64a5231212bfe021eef36fafa Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 19 Sep 2016 17:40:32 +0000 Subject: A clang tool for changing surrouding namespaces of class/function definitions. 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 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@281918 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bdbd5abe..4c8cdad6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ add_subdirectory(clang-tidy) add_subdirectory(clang-tidy-vs) endif() +add_subdirectory(change-namespace) add_subdirectory(clang-query) add_subdirectory(include-fixer) add_subdirectory(pp-trace) -- cgit v1.2.3