This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Don't index __reserved_names in headers.
ClosedPublic

Authored by sammccall on Dec 7 2021, 3:52 PM.

Details

Summary

Main use of these is in the standard library, where they generally clutter up
the index.

Certain macros are also common, we don't touch indexing of macros in this patch.

Diff Detail

Event Timeline

sammccall created this revision.Dec 7 2021, 3:52 PM
sammccall requested review of this revision.Dec 7 2021, 3:52 PM
nridge added a subscriber: nridge.Dec 13 2021, 1:17 PM
kadircet accepted this revision.Jan 4 2022, 10:20 PM

thanks!

clang-tools-extra/clangd/SourceCode.h
334

nit: maybe move definition out-of-line.

clang-tools-extra/clangd/unittests/QualityTests.cpp
60

can we still have a test that indexes main file symbols and ensures ReservedName is set correctly?

This revision is now accepted and ready to land.Jan 4 2022, 10:20 PM
sammccall marked an inline comment as done.Jan 5 2022, 7:33 AM
sammccall added inline comments.
clang-tools-extra/clangd/SourceCode.h
334

This "just a few instructions", I'd rather let the compiler make that call...

clang-tools-extra/clangd/unittests/QualityTests.cpp
60

Whoops, of course.

This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.