[PATCH] D134827: [clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 28 13:00:05 PDT 2022
nridge created this revision.
nridge added reviewers: sammccall, kadircet.
Herald added a subscriber: arphaman.
Herald added a project: All.
nridge requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134827
Files:
clang-tools-extra/clangd/SemanticHighlighting.cpp
Index: clang-tools-extra/clangd/SemanticHighlighting.cpp
===================================================================
--- clang-tools-extra/clangd/SemanticHighlighting.cpp
+++ clang-tools-extra/clangd/SemanticHighlighting.cpp
@@ -140,7 +140,7 @@
return HighlightingKind::Concept;
if (const auto *UUVD = dyn_cast<UnresolvedUsingValueDecl>(D)) {
auto Targets = Resolver->resolveUsingValueDecl(UUVD);
- if (!Targets.empty()) {
+ if (!Targets.empty() && Targets[0] != UUVD) {
return kindForDecl(Targets[0], Resolver);
}
return HighlightingKind::Unknown;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134827.463660.patch
Type: text/x-patch
Size: 593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220928/bb367689/attachment.bin>
More information about the cfe-commits
mailing list