This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Set "spelled" flag for constructor references.
ClosedPublic

Authored by hokein on Feb 6 2020, 6:07 AM.

Details

Summary

DeclarationName for cxx constructor is special, it is not an identifier.
thus the "Spelled" flag are not set for all ctor references, this patch
fixes it.

Diff Detail

Event Timeline

hokein created this revision.Feb 6 2020, 6:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2020, 6:07 AM
hokein updated this revision to Diff 242890.Feb 6 2020, 6:12 AM

update.

kadircet added inline comments.Feb 6 2020, 6:33 AM
clang-tools-extra/clangd/index/SymbolCollector.cpp
597

drive-by: what about destructors?

kbobyrev accepted this revision.Feb 6 2020, 6:35 AM
kbobyrev added inline comments.
clang-tools-extra/clangd/index/SymbolCollector.cpp
595–598

nit: const auto?

clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
752

nit: maybe add operator != to SymbolKind instead?

This revision is now accepted and ready to land.Feb 6 2020, 6:35 AM
hokein marked 3 inline comments as done.Feb 6 2020, 8:01 AM
hokein added inline comments.
clang-tools-extra/clangd/index/SymbolCollector.cpp
597

we aren't interested in destructors (particularly the ~) as there is a Foo typeloc in "~[[Foo]]".

This revision was automatically updated to reflect the committed changes.