[PATCH] D127184: [clangd] Add <bits/ranges_algo.h> to header map

Florian Albrechtskirchinger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 6 23:32:39 PDT 2022


falbrechtskirchinger created this revision.
falbrechtskirchinger added a reviewer: sammccall.
Herald added subscribers: usaxena95, kadircet, arphaman.
Herald added a project: All.
falbrechtskirchinger requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.

Header insertion inserts the internal <bits/ranges_algo.h> header when
completing, e.g., std::ranges::transform. By adding a mapping to the
<algorithm> header to the system header map, the expected header is
inserted.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127184

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
@@ -237,6 +237,7 @@
       {"bits/random.h", "<random>"},
       {"bits/random.tcc", "<random>"},
       {"bits/range_access.h", "<iterator>"},
+      {"bits/ranges_algo.h", "<algorithm>"},
       {"bits/refwrap.h", "<functional>"},
       {"bits/regex.h", "<regex>"},
       {"bits/regex_automaton.h", "<regex>"},


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127184.434698.patch
Type: text/x-patch
Size: 557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220607/6c5d5b23/attachment.bin>


More information about the cfe-commits mailing list