summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2018-11-23 15:02:33 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2018-11-23 15:02:33 +0000
commitda113f3202bafb6ecb0a5e51c741e49b7681a91f (patch)
treed75b46d92665f8652df1b658401070d2bb4682fa
parentdaa515e6a1867bcd23db553411ce41da0252cb9a (diff)
downloadbcm5719-llvm-da113f3202bafb6ecb0a5e51c741e49b7681a91f.tar.gz
bcm5719-llvm-da113f3202bafb6ecb0a5e51c741e49b7681a91f.zip
Remove the optional dependency from libclang to clang-tidy/include-fixer
clangd does a better job on both of these, so don't slow down everyone's build for a poorly working libclang feature. llvm-svn: 347496
-rw-r--r--clang-tools-extra/test/clang-tidy/basic.cpp1
-rw-r--r--clang-tools-extra/test/include-fixer/yamldb_plugin.cpp25
-rw-r--r--clang/tools/libclang/CIndex.cpp13
-rw-r--r--clang/tools/libclang/CMakeLists.txt9
4 files changed, 0 insertions, 48 deletions
diff --git a/clang-tools-extra/test/clang-tidy/basic.cpp b/clang-tools-extra/test/clang-tidy/basic.cpp
index 12eb6febbac..e57350289c2 100644
--- a/clang-tools-extra/test/clang-tidy/basic.cpp
+++ b/clang-tools-extra/test/clang-tidy/basic.cpp
@@ -1,5 +1,4 @@
// RUN: clang-tidy %s -checks='-*,llvm-namespace-comment' -- | FileCheck %s
-// RUN: c-index-test -test-load-source-reparse 2 all %s -Xclang -add-plugin -Xclang clang-tidy -Xclang -plugin-arg-clang-tidy -Xclang -checks='-*,llvm-namespace-comment' 2>&1 | FileCheck %s
namespace i {
}
diff --git a/clang-tools-extra/test/include-fixer/yamldb_plugin.cpp b/clang-tools-extra/test/include-fixer/yamldb_plugin.cpp
deleted file mode 100644
index 5b6760a9cd8..00000000000
--- a/clang-tools-extra/test/include-fixer/yamldb_plugin.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// REQUIRES: static-analyzer
-// RUN: c-index-test -test-load-source-reparse 2 all %s -Xclang -add-plugin -Xclang clang-include-fixer -fspell-checking -Xclang -plugin-arg-clang-include-fixer -Xclang -input=%p/Inputs/fake_yaml_db.yaml 2>&1 | FileCheck %s
-
-foo f;
-foo g;
-unknown u;
-
-// CHECK: yamldb_plugin.cpp:4:1: error: unknown type name 'foo'; did you mean 'foo'?
-// CHECK: Number FIX-ITs = 1
-// CHECK: FIX-IT: Replace [4:1 - 4:4] with "foo"
-// CHECK: yamldb_plugin.cpp:4:1: note: Add '#include "foo.h"' to provide the missing declaration [clang-include-fixer]
-// CHECK: Number FIX-ITs = 1
-// CHECK: FIX-IT: Insert "#include "foo.h"
-// CHECK: yamldb_plugin.cpp:5:1: error: unknown type name 'foo'; did you mean 'foo'?
-// CHECK: Number FIX-ITs = 1
-// CHECK: FIX-IT: Replace [5:1 - 5:4] with "foo"
-// CHECK: yamldb_plugin.cpp:5:1: note: Add '#include "foo.h"' to provide the missing declaration [clang-include-fixer]
-// CHECK: Number FIX-ITs = 1
-// CHECK: FIX-IT: Insert "#include "foo.h"
-// CHECK: " at 4:1
-// CHECK: yamldb_plugin.cpp:6:1:
-// CHECK: error: unknown type name 'unknown'
-// CHECK: Number FIX-ITs = 0
-// CHECK-NOT: error
-// CHECK-NOT: FIX-IT
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index e9bc3939719..03208bb5a4c 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -8938,16 +8938,3 @@ cxindex::Logger::~Logger() {
OS << "--------------------------------------------------\n";
}
}
-
-#ifdef CLANG_TOOL_EXTRA_BUILD
-// This anchor is used to force the linker to link the clang-tidy plugin.
-extern volatile int ClangTidyPluginAnchorSource;
-static int LLVM_ATTRIBUTE_UNUSED ClangTidyPluginAnchorDestination =
- ClangTidyPluginAnchorSource;
-
-// This anchor is used to force the linker to link the clang-include-fixer
-// plugin.
-extern volatile int ClangIncludeFixerPluginAnchorSource;
-static int LLVM_ATTRIBUTE_UNUSED ClangIncludeFixerPluginAnchorDestination =
- ClangIncludeFixerPluginAnchorSource;
-#endif
diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt
index 729d5560b65..17ba0a08452 100644
--- a/clang/tools/libclang/CMakeLists.txt
+++ b/clang/tools/libclang/CMakeLists.txt
@@ -47,15 +47,6 @@ if (CLANG_ENABLE_ARCMT)
list(APPEND LIBS clangARCMigrate)
endif ()
-if (TARGET clangTidyPlugin)
- add_definitions(-DCLANG_TOOL_EXTRA_BUILD)
- list(APPEND LIBS clangTidyPlugin)
- list(APPEND LIBS clangIncludeFixerPlugin)
- if(LLVM_ENABLE_MODULES)
- list(APPEND LLVM_COMPILE_FLAGS "-fmodules-ignore-macro=CLANG_TOOL_EXTRA_BUILD")
- endif()
-endif ()
-
find_library(DL_LIBRARY_PATH dl)
if (DL_LIBRARY_PATH)
list(APPEND LIBS dl)
OpenPOWER on IntegriCloud