[clangd] Rename Features.h -> Feature.h to avoid confilct with libstdc++
authorSam McCall <sam.mccall@gmail.com>
Thu, 5 Aug 2021 12:27:40 +0000 (14:27 +0200)
committerSam McCall <sam.mccall@gmail.com>
Fri, 6 Aug 2021 16:56:41 +0000 (18:56 +0200)
Fixes https://github.com/clangd/clangd/issues/835

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

12 files changed:
clang-tools-extra/clangd/CMakeLists.txt
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ConfigCompile.cpp
clang-tools-extra/clangd/Feature.cpp [moved from clang-tools-extra/clangd/Features.cpp with 93% similarity]
clang-tools-extra/clangd/Feature.h [moved from clang-tools-extra/clangd/Features.h with 68% similarity]
clang-tools-extra/clangd/ParsedAST.cpp
clang-tools-extra/clangd/Transport.h
clang-tools-extra/clangd/index/remote/Client.cpp
clang-tools-extra/clangd/index/remote/server/Server.cpp
clang-tools-extra/clangd/tool/ClangdMain.cpp
clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp
clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp

index 5aee128..476de70 100644 (file)
@@ -71,7 +71,7 @@ add_clang_library(clangDaemon
   DumpAST.cpp
   ExpectedTypes.cpp
   FeatureModule.cpp
-  Features.cpp
+  Feature.cpp
   FindSymbols.cpp
   FindTarget.cpp
   FileDistance.cpp
index 90d6e11..a9debfd 100644 (file)
@@ -12,7 +12,7 @@
 #include "Diagnostics.h"
 #include "DraftStore.h"
 #include "DumpAST.h"
-#include "Features.h"
+#include "Feature.h"
 #include "GlobalCompilationDatabase.h"
 #include "LSPBinder.h"
 #include "Protocol.h"
index 4eaff34..ad117b3 100644 (file)
@@ -28,7 +28,7 @@
 #include "ConfigFragment.h"
 #include "ConfigProvider.h"
 #include "Diagnostics.h"
-#include "Features.h"
+#include "Feature.h"
 #include "TidyProvider.h"
 #include "support/Logger.h"
 #include "support/Path.h"
similarity index 93%
rename from clang-tools-extra/clangd/Features.cpp
rename to clang-tools-extra/clangd/Feature.cpp
index d7fba42..5664a88 100644 (file)
@@ -1,4 +1,4 @@
-//===--- Features.cpp - Compile-time configuration ------------------------===//
+//===--- Feature.cpp - Compile-time configuration ------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Features.h"
+#include "Feature.h"
 #include "clang/Basic/Version.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Host.h"
similarity index 68%
rename from clang-tools-extra/clangd/Features.h
rename to clang-tools-extra/clangd/Feature.h
index 1723eb3..ba958fc 100644 (file)
@@ -1,13 +1,16 @@
-//===--- Features.h - Compile-time configuration ------------------*-C++-*-===//
+//===--- Feature.h - Compile-time configuration ------------------*-C++-*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
+// This file is not named "Features.h" because of a conflict with libstdc++:
+// https://github.com/clangd/clangd/issues/835
+//===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FEATURES_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FEATURES_H
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FEATURE_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FEATURE_H
 #include <string>
 
 // Export constants like CLANGD_BUILD_XPC
index a60b9b6..e3fd08a 100644 (file)
@@ -14,8 +14,8 @@
 #include "Compiler.h"
 #include "Config.h"
 #include "Diagnostics.h"
+#include "Feature.h"
 #include "FeatureModule.h"
-#include "Features.h"
 #include "Headers.h"
 #include "HeuristicResolver.h"
 #include "IncludeFixer.h"
index b3db4eb..7076217 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H_
 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_TRANSPORT_H_
 
-#include "Features.h"
+#include "Feature.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/JSON.h"
 #include "llvm/Support/raw_ostream.h"
index 8db2287..391da39 100644 (file)
@@ -9,7 +9,7 @@
 #include <grpc++/grpc++.h>
 
 #include "Client.h"
-#include "Features.h"
+#include "Feature.h"
 #include "Service.grpc.pb.h"
 #include "index/Index.h"
 #include "marshalling/Marshalling.h"
index d2f96ba..3962680 100644 (file)
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Features.h"
+#include "Feature.h"
 #include "Index.pb.h"
 #include "MonitoringService.grpc.pb.h"
 #include "MonitoringService.pb.h"
index 234fee0..103966d 100644 (file)
@@ -10,7 +10,7 @@
 #include "CodeComplete.h"
 #include "Config.h"
 #include "ConfigProvider.h"
-#include "Features.h"
+#include "Feature.h"
 #include "PathMapping.h"
 #include "Protocol.h"
 #include "TidyProvider.h"
index eab28bb..564629a 100644 (file)
@@ -9,7 +9,7 @@
 #include "Config.h"
 #include "ConfigFragment.h"
 #include "ConfigTesting.h"
-#include "Features.h"
+#include "Feature.h"
 #include "TestFS.h"
 #include "clang/Basic/DiagnosticSema.h"
 #include "llvm/ADT/None.h"
index e2af783..8704025 100644 (file)
@@ -9,8 +9,8 @@
 #include "Annotations.h"
 #include "Config.h"
 #include "Diagnostics.h"
+#include "Feature.h"
 #include "FeatureModule.h"
-#include "Features.h"
 #include "ParsedAST.h"
 #include "Protocol.h"
 #include "SourceCode.h"