Page MenuHomePhabricator

[clangd] Catch more symbols in SymbolCollector.

Authored by hokein on Jan 5 2018, 2:48 AM.



We currently only collect external-linkage symbols in the collector,
which results in missing some typical symbols (like no-linkage type alias symbols).

This patch relaxes the constraint a bit to allow collecting more symbols.

Diff Detail

Event Timeline

hokein created this revision.Jan 5 2018, 2:48 AM
ilya-biryukov added inline comments.Jan 8 2018, 5:22 AM

Why don't we include symbols from anonymous namespaces too?
They are very similar to static symbols.

hokein added inline comments.Jan 8 2018, 5:29 AM

Yeah, these symbols need a special handling (the qualified name is like foo::<anonymous>::bar), we don't support them well enough. I think it is fine to ignore them at the moment.

ilya-biryukov accepted this revision.Jan 9 2018, 2:26 AM

LGTM (see the review comment about adding a comment in the code too)


Makes sense.
Let's add a comment on why we skip them here.

This revision is now accepted and ready to land.Jan 9 2018, 2:26 AM
hokein updated this revision to Diff 129053.Jan 9 2018, 2:41 AM

Add a comment for symbols in anonymous namespace.

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