[all-commits] [llvm/llvm-project] 290a98: [clangd] Allow indexing of __reserved_names outsid...
Sam McCall via All-commits
all-commits at lists.llvm.org
Fri Jul 21 14:30:47 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 290a98c7b00899b6aba0fc892e8f29fecc00a82e
https://github.com/llvm/llvm-project/commit/290a98c7b00899b6aba0fc892e8f29fecc00a82e
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2023-07-21 (Fri, 21 Jul 2023)
Changed paths:
M clang-tools-extra/clangd/index/SymbolCollector.cpp
M clang-tools-extra/clangd/index/SymbolCollector.h
M clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
Log Message:
-----------
[clangd] Allow indexing of __reserved_names outside system headers
The special handling for these names was added in
https://github.com/llvm/llvm-project/commit/055d8090d1d5137dab88533995e0c5d9b5390c28
and the motivation was the C++ standard library.
It turns out some projects like using these names anyway, in particular the
linux kernel. D153946 proposed making this a config option, but there are
some implementation issues with the config system.
As an alternative, this patch tweaks the heuristic so we only drop these symbols
in system headers. This does the right thing for linux and the C++ standard
library, at least.
Fixes https://github.com/clangd/clangd/issues/1680
Fixes https://github.com/llvm/llvm-project/issues/63862
Differential Revision: https://reviews.llvm.org/D155381
More information about the All-commits
mailing list