diff --git a/clang-tools-extra/clangd/FindTarget.cpp b/clang-tools-extra/clangd/FindTarget.cpp --- a/clang-tools-extra/clangd/FindTarget.cpp +++ b/clang-tools-extra/clangd/FindTarget.cpp @@ -742,13 +742,6 @@ // FIXME: handle more complicated cases: more ObjC, designated initializers. llvm::SmallVector Refs; - void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *E) { - Refs.push_back(ReferenceLoc{E->getNestedNameSpecifierLoc(), - E->getConceptNameLoc(), - /*IsDecl=*/false, - {E->getNamedConcept()}}); - } - void VisitDeclRefExpr(const DeclRefExpr *E) { Refs.push_back(ReferenceLoc{E->getQualifierLoc(), E->getNameInfo().getLoc(), @@ -1063,15 +1056,12 @@ return RecursiveASTVisitor::TraverseConstructorInitializer(Init); } - bool TraverseTypeConstraint(const TypeConstraint *TC) { - // We want to handle all ConceptReferences but RAV is missing a - // polymorphic Visit or Traverse method for it, so we handle - // TypeConstraints specially here. - Out(ReferenceLoc{TC->getNestedNameSpecifierLoc(), - TC->getConceptNameLoc(), + bool VisitConceptReference(ConceptReference *ConceptRef) { + Out(ReferenceLoc{ConceptRef->getNestedNameSpecifierLoc(), + ConceptRef->getConceptNameLoc(), /*IsDecl=*/false, - {TC->getNamedConcept()}}); - return RecursiveASTVisitor::TraverseTypeConstraint(TC); + {ConceptRef->getNamedConcept()}}); + return true; } private: diff --git a/clang-tools-extra/clangd/SemanticHighlighting.cpp b/clang-tools-extra/clangd/SemanticHighlighting.cpp --- a/clang-tools-extra/clangd/SemanticHighlighting.cpp +++ b/clang-tools-extra/clangd/SemanticHighlighting.cpp @@ -736,14 +736,6 @@ return true; } - bool VisitAutoTypeLoc(AutoTypeLoc L) { - if (L.isConstrained()) { - H.addAngleBracketTokens(L.getLAngleLoc(), L.getRAngleLoc()); - H.addToken(L.getConceptNameInfo().getLoc(), HighlightingKind::Concept); - } - return true; - } - bool VisitFunctionDecl(FunctionDecl *D) { if (D->isOverloadedOperator()) { const auto AddOpDeclToken = [&](SourceLocation Loc) {