sammccall added inline comments.
================ Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:38 + bool VisitNamedDecl(NamedDecl *ND) { + if (ND->getDeclName().isEmpty()) + // Don't add symbols that don't have any length. ---------------- I think you might want to bail out (both here and in VisitDeclRefExpr) if the name kind isn't identifier. Reason is you're only coloring the token at location, and most of the other name kinds can span multiple tokens or otherwise need special consideration. ================ Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:61 + } + if(isa<FunctionDecl>(D)) { + addToken(Loc, HighlightingKind::Function); ---------------- note that methods, constructors, and destructors inherit from functiondecl, so if you want to exclude/distinguish those, order matters here Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64199/new/ https://reviews.llvm.org/D64199 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits