This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Allow indexing of __reserved_names outside system headers

Authored by sammccall on Jul 15 2023, 1:21 PM.



The special handling for these names was added in
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.


Diff Detail

Event Timeline

sammccall created this revision.Jul 15 2023, 1:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2023, 1:21 PM
sammccall requested review of this revision.Jul 15 2023, 1:21 PM
nridge accepted this revision.Jul 21 2023, 12:52 AM

Thanks! I agree that this no-configuration approach is nicer.

This revision is now accepted and ready to land.Jul 21 2023, 12:52 AM
This revision was landed with ongoing or failed builds.Jul 21 2023, 2:30 PM
This revision was automatically updated to reflect the committed changes.