[clang-tools-extra] 4ad9ec8 - [clangd] Rename Features.h -> Feature.h to avoid confilct with libstdc++
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 6 09:56:49 PDT 2021
Author: Sam McCall
Date: 2021-08-06T18:56:41+02:00
New Revision: 4ad9ec8a328ccb3b836c993bba954366f05b2fd4
URL: https://github.com/llvm/llvm-project/commit/4ad9ec8a328ccb3b836c993bba954366f05b2fd4
DIFF: https://github.com/llvm/llvm-project/commit/4ad9ec8a328ccb3b836c993bba954366f05b2fd4.diff
LOG: [clangd] Rename Features.h -> Feature.h to avoid confilct with libstdc++
Fixes https://github.com/clangd/clangd/issues/835
Differential Revision: https://reviews.llvm.org/D107624
Added:
clang-tools-extra/clangd/Feature.cpp
clang-tools-extra/clangd/Feature.h
Modified:
clang-tools-extra/clangd/CMakeLists.txt
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ConfigCompile.cpp
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
Removed:
clang-tools-extra/clangd/Features.cpp
clang-tools-extra/clangd/Features.h
################################################################################
diff --git a/clang-tools-extra/clangd/CMakeLists.txt b/clang-tools-extra/clangd/CMakeLists.txt
index 5aee128c9d6b5..476de70654cf9 100644
--- a/clang-tools-extra/clangd/CMakeLists.txt
+++ b/clang-tools-extra/clangd/CMakeLists.txt
@@ -71,7 +71,7 @@ add_clang_library(clangDaemon
DumpAST.cpp
ExpectedTypes.cpp
FeatureModule.cpp
- Features.cpp
+ Feature.cpp
FindSymbols.cpp
FindTarget.cpp
FileDistance.cpp
diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp
index 90d6e1159750a..a9debfd2a6ed5 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.cpp
+++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp
@@ -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"
diff --git a/clang-tools-extra/clangd/ConfigCompile.cpp b/clang-tools-extra/clangd/ConfigCompile.cpp
index 4eaff343b2290..ad117b3d77be4 100644
--- a/clang-tools-extra/clangd/ConfigCompile.cpp
+++ b/clang-tools-extra/clangd/ConfigCompile.cpp
@@ -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"
diff --git a/clang-tools-extra/clangd/Features.cpp b/clang-tools-extra/clangd/Feature.cpp
similarity index 93%
rename from clang-tools-extra/clangd/Features.cpp
rename to clang-tools-extra/clangd/Feature.cpp
index d7fba42a3408c..5664a8869bb00 100644
--- a/clang-tools-extra/clangd/Features.cpp
+++ b/clang-tools-extra/clangd/Feature.cpp
@@ -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"
diff --git a/clang-tools-extra/clangd/Features.h b/clang-tools-extra/clangd/Feature.h
similarity index 68%
rename from clang-tools-extra/clangd/Features.h
rename to clang-tools-extra/clangd/Feature.h
index 1723eb37b3bc1..ba958fc49c020 100644
--- a/clang-tools-extra/clangd/Features.h
+++ b/clang-tools-extra/clangd/Feature.h
@@ -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
diff --git a/clang-tools-extra/clangd/ParsedAST.cpp b/clang-tools-extra/clangd/ParsedAST.cpp
index a60b9b6fe486a..e3fd08afdaa7e 100644
--- a/clang-tools-extra/clangd/ParsedAST.cpp
+++ b/clang-tools-extra/clangd/ParsedAST.cpp
@@ -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"
diff --git a/clang-tools-extra/clangd/Transport.h b/clang-tools-extra/clangd/Transport.h
index b3db4eba85f93..70762176364f1 100644
--- a/clang-tools-extra/clangd/Transport.h
+++ b/clang-tools-extra/clangd/Transport.h
@@ -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"
diff --git a/clang-tools-extra/clangd/index/remote/Client.cpp b/clang-tools-extra/clangd/index/remote/Client.cpp
index 8db2287654600..391da3916259c 100644
--- a/clang-tools-extra/clangd/index/remote/Client.cpp
+++ b/clang-tools-extra/clangd/index/remote/Client.cpp
@@ -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"
diff --git a/clang-tools-extra/clangd/index/remote/server/Server.cpp b/clang-tools-extra/clangd/index/remote/server/Server.cpp
index d2f96ba1a1b53..3962680532258 100644
--- a/clang-tools-extra/clangd/index/remote/server/Server.cpp
+++ b/clang-tools-extra/clangd/index/remote/server/Server.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "Features.h"
+#include "Feature.h"
#include "Index.pb.h"
#include "MonitoringService.grpc.pb.h"
#include "MonitoringService.pb.h"
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index 234fee0c44476..103966dd08620 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -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"
diff --git a/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp b/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp
index eab28bb7fa0e5..564629aa7d3a2 100644
--- a/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp
+++ b/clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp
@@ -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"
diff --git a/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp b/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
index e2af7833330d2..870402588e763 100644
--- a/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
+++ b/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
@@ -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"
More information about the cfe-commits
mailing list