This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Highlighting dependent types in more contexts
ClosedPublic

Authored by nridge on Nov 26 2019, 2:35 PM.

Diff Detail

Event Timeline

nridge created this revision.Nov 26 2019, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 26 2019, 2:35 PM
ilya-biryukov added inline comments.Nov 27 2019, 1:26 AM
clang-tools-extra/clangd/SemanticHighlighting.cpp
258

Instead of calling visitDependentTypesInQualifier, implement TraverseNestedNameSpecifierLoc to catch all their occurrences.

No need to redo the traversal, it should be handled by RecursiveASTVisitor.

262

NIT: remove the comment, it is redundant. One can always navigate to the definition of DependentTemplateSpecializationTypeLoc if they need to understand what it is.

nridge updated this revision to Diff 231609.Nov 30 2019, 9:22 PM

Address review comments

ilya-biryukov accepted this revision.Dec 2 2019, 12:22 AM

Thanks! LGTM

clang-tools-extra/clangd/SemanticHighlighting.cpp
275

NIT: remove braces from the inner if. They look totally ok in the outer if, though

This revision is now accepted and ready to land.Dec 2 2019, 12:22 AM
nridge updated this revision to Diff 232012.Dec 3 2019, 4:20 PM

Address nit

This revision was automatically updated to reflect the committed changes.