diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index 67c857c378e1b9..973816253f42f3 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -445,8 +445,8 @@ locateSymbolTextually(const SpelledWord &Word, ParsedAST &AST, if ((Word.ExpandedToken && !isDependentName(NodeKind)) || !Word.LikelyIdentifier || !Index) return {}; - // We don't want to handle words in string literals. It'd be nice to include - // comments, but they're not retained in TokenBuffer. + // We don't want to handle words in string literals. (It'd be nice to list + // *allowed* token kinds explicitly, but comment Tokens aren't retained). if (Word.PartOfSpelledToken && isStringLiteral(Word.PartOfSpelledToken->kind())) return {}; @@ -548,8 +548,8 @@ const syntax::Token *findNearbyIdentifier(const SpelledWord &Word, // Unlikely identifiers are OK if they were used as identifiers nearby. if (Word.ExpandedToken) return nullptr; - // We don't want to handle words in string literals. It'd be nice to include - // comments, but they're not retained in TokenBuffer. + // We don't want to handle words in string literals. (It'd be nice to list + // *allowed* token kinds explicitly, but comment Tokens aren't retained). if (Word.PartOfSpelledToken && isStringLiteral(Word.PartOfSpelledToken->kind())) return {};