Clangd maintains a symbol map from standard library, in order to prevent
unexpected header/symbol leaks from internal files. (e.g. files under
bits/ for libstdc++) This symbol map was generated by a python script
that parses pages of offline cppreference archive. The script didn't
handle the case for std::experimental::, where most symbols are from
TS. It works well as symbols are directly laid out in the corresponding
header under experimental directory for most of time.
However, libstdc++'s implementation split symbols of TS FS into a few
header files located in experimental/bits. This would make the code
completion provide internal headers when we simply select the symbols.
There are slightly differences between TS FS and C++17 FS. Some
functions like system_complete was replaced by absolute and
relative-related operations were introduced later by another proposal.
Even so, all mainstream implementation are based on N4100, the final
filesystem TS draft that was published in 2014 and from which symbols
we've added are exported.
This fixes https://github.com/clangd/clangd/issues/1481
i think comment is a little too verbose. can you just say:
There's no need for mentioning that these became the standard in C++17 or being a cornerstone for stdlib implementations. As they won't necessarily be true for other technical specs nor if we were adding this pre-c++17 standardisation. But we'd still like to have these widely adapted symbols included in the mapping to make sure we're not generating false negatives.