Author: Sam McCall Date: 2020-09-24T10:49:39+02:00 New Revision: 98756d865b696bece858ff0832ed3687b6b8ba4b
URL: https://github.com/llvm/llvm-project/commit/98756d865b696bece858ff0832ed3687b6b8ba4b DIFF: https://github.com/llvm/llvm-project/commit/98756d865b696bece858ff0832ed3687b6b8ba4b.diff LOG: [clangd] Fix comment. NFC Added: Modified: clang-tools-extra/clangd/XRefs.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index 67c857c378e1..973816253f42 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 {}; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits