Move clang/Tooling/Core/Lookup.h to clang/Tooling/Refactoring/Lookup.h
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Tue, 20 Oct 2020 07:54:07 +0000 (08:54 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Tue, 20 Oct 2020 09:13:28 +0000 (10:13 +0100)
This allows removing the clangAST dependency from libclangToolingCore and
therefore allows clang-format to be built without depending on clangAST.
Before 1166 files had to be compiled for clang-format, now only 796.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D89708

clang/include/clang/Tooling/Refactoring/Lookup.h [moved from clang/include/clang/Tooling/Core/Lookup.h with 93% similarity]
clang/lib/Format/FormatInternal.h
clang/lib/Tooling/Core/CMakeLists.txt
clang/lib/Tooling/Refactoring/CMakeLists.txt
clang/lib/Tooling/Refactoring/Lookup.cpp [moved from clang/lib/Tooling/Core/Lookup.cpp with 99% similarity]
clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
clang/unittests/Tooling/LookupTest.cpp

similarity index 93%
rename from clang/include/clang/Tooling/Core/Lookup.h
rename to clang/include/clang/Tooling/Refactoring/Lookup.h
index 02b561c..448bc42 100644 (file)
@@ -10,8 +10,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_TOOLING_CORE_LOOKUP_H
-#define LLVM_CLANG_TOOLING_CORE_LOOKUP_H
+#ifndef LLVM_CLANG_TOOLING_REFACTOR_LOOKUP_H
+#define LLVM_CLANG_TOOLING_REFACTOR_LOOKUP_H
 
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/SourceLocation.h"
@@ -47,4 +47,4 @@ std::string replaceNestedName(const NestedNameSpecifier *Use,
 } // end namespace tooling
 } // end namespace clang
 
-#endif // LLVM_CLANG_TOOLING_CORE_LOOKUP_H
+#endif // LLVM_CLANG_TOOLING_REFACTOR_LOOKUP_H
index 3aa616d..9043ce3 100644 (file)
@@ -16,7 +16,6 @@
 #define LLVM_CLANG_LIB_FORMAT_FORMATINTERNAL_H
 
 #include "BreakableToken.h"
-#include "clang/Tooling/Core/Lookup.h"
 #include <utility>
 
 namespace clang {
index f7f423c..e523ca4 100644 (file)
@@ -2,11 +2,9 @@ set(LLVM_LINK_COMPONENTS support)
 
 add_clang_library(clangToolingCore
   Diagnostic.cpp
-  Lookup.cpp
   Replacement.cpp
 
   LINK_LIBS
-  clangAST
   clangBasic
   clangLex
   clangRewrite
index 0565de2..d3077be 100644 (file)
@@ -6,6 +6,7 @@ add_clang_library(clangToolingRefactoring
   AtomicChange.cpp
   Extract/Extract.cpp
   Extract/SourceExtraction.cpp
+  Lookup.cpp
   RefactoringActions.cpp
   Rename/RenamingAction.cpp
   Rename/SymbolOccurrences.cpp
similarity index 99%
rename from clang/lib/Tooling/Core/Lookup.cpp
rename to clang/lib/Tooling/Refactoring/Lookup.cpp
index 712724a..9468d4d 100644 (file)
@@ -10,7 +10,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "clang/Tooling/Core/Lookup.h"
+#include "clang/Tooling/Refactoring/Lookup.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclCXX.h"
index dfc319d..6a08c7f 100644 (file)
@@ -21,7 +21,7 @@
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Lex/Lexer.h"
-#include "clang/Tooling/Core/Lookup.h"
+#include "clang/Tooling/Refactoring/Lookup.h"
 #include "clang/Tooling/Refactoring/RecursiveSymbolVisitor.h"
 #include "clang/Tooling/Refactoring/Rename/SymbolName.h"
 #include "clang/Tooling/Refactoring/Rename/USRFinder.h"
index 372cbbf..05494cb 100644 (file)
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "clang/Tooling/Refactoring/Lookup.h"
 #include "TestVisitor.h"
-#include "clang/Tooling/Core/Lookup.h"
 using namespace clang;
 
 namespace {