[clang-tools-extra] [Clangd] Don't traverse ConceptDecl in typeForNode (PR #191654)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 11 13:11:02 PDT 2026
================
@@ -2060,6 +2060,7 @@ static QualType typeForNode(const ASTContext &Ctx, const HeuristicResolver *H,
QualType VisitTemplateDecl(const TemplateDecl *D) {
return Visit(D->getTemplatedDecl());
}
+ QualType VisitConceptDecl(const ConceptDecl *C) { return QualType(); }
----------------
hokein wrote:
how about doing a nullptr check in the above `VisitTemplateDecl()`?
```
QualType VisitTemplateDecl(const TemplateDecl *D) {
if (const auto* TD = D->getTemplateDecl())
return Visit(D->getTemplatedDecl());
return QualType();
}
```
https://github.com/llvm/llvm-project/pull/191654
More information about the cfe-commits
mailing list