[PATCH] D62527: [clangd] Remove the whitelist std symbols in CanonicalIncludes.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 28 07:40:41 PDT 2019
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
These symbols have been included via StdSymbolMap.inc.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62527
Files:
clang-tools-extra/clangd/index/CanonicalIncludes.cpp
Index: clang-tools-extra/clangd/index/CanonicalIncludes.cpp
===================================================================
--- clang-tools-extra/clangd/index/CanonicalIncludes.cpp
+++ clang-tools-extra/clangd/index/CanonicalIncludes.cpp
@@ -88,16 +88,6 @@
void addSystemHeadersMapping(CanonicalIncludes *Includes) {
static const std::vector<std::pair<const char *, const char *>> SymbolMap = {
- // Map symbols in <iosfwd> to their preferred includes.
- {"std::basic_filebuf", "<fstream>"},
- {"std::filebuf", "<fstream>"},
- {"std::wfilebuf", "<fstream>"},
- {"std::basic_istream", "<istream>"},
- {"std::istream", "<istream>"},
- {"std::wistream", "<istream>"},
- {"std::basic_ostream", "<ostream>"},
- {"std::ostream", "<ostream>"},
- {"std::wostream", "<ostream>"},
{"std::uint_least16_t", "<cstdint>"}, // <type_traits> redeclares these
{"std::uint_least32_t", "<cstdint>"},
#define SYMBOL(Name, NameSpace, Header) { #NameSpace#Name, #Header },
@@ -110,8 +100,6 @@
// FIXME: remove the std header mapping once we support ambiguous symbols, now
// it serves as a fallback to disambiguate:
// - symbols with mulitiple headers (e.g. std::move)
- // - symbols with a primary template in one header and a specialization in
- // another (std::abs)
static const std::vector<std::pair<const char *, const char *>>
SystemHeaderMap = {
{"include/__stddef_max_align_t.h", "<cstddef>"},
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62527.201668.patch
Type: text/x-patch
Size: 1496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190528/bd8cba0c/attachment-0001.bin>
More information about the cfe-commits
mailing list