This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Added highlighting for the targets in typedefs.
ClosedPublic

Authored by jvikstrom on Jul 15 2019, 9:51 AM.

Details

Summary

In typedef int A the A was not highlighted previously.

This patch gives A the same kind of highlighting that the underlying type has (class/enum) (which in this example is no special highlighting because builtins are not handled yet)
Will add highlightings for built ins in another patch.

Diff Detail

Repository
rL LLVM

Event Timeline

jvikstrom created this revision.Jul 15 2019, 9:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2019, 9:51 AM
hokein added inline comments.Jul 16 2019, 2:18 AM
clang-tools-extra/clangd/SemanticHighlighting.cpp
88 ↗(On Diff #209893)

Do we plan to support the type alias using Y = X; as well? TypedefNameDecl should cover both cases.

jvikstrom updated this revision to Diff 210053.Jul 16 2019, 2:48 AM

Add support for using A = ....

jvikstrom marked an inline comment as done.Jul 16 2019, 2:48 AM
hokein accepted this revision.Jul 16 2019, 4:45 AM
This revision is now accepted and ready to land.Jul 16 2019, 4:45 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 16 2019, 6:23 AM