[clang] [clang-tools-extra] [clangd] Fix crash with null check for Token at Loc (PR #94528)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 6 03:54:19 PDT 2024


================
@@ -1354,6 +1354,8 @@ maybeFindIncludeReferences(ParsedAST &AST, Position Pos,
 
         ReferencesResult::Reference Result;
         const auto *Token = AST.getTokens().spelledTokenAt(Loc);
+        if (!Token)
----------------
usx95 wrote:

Modified `spelledTokenAt`.

https://github.com/llvm/llvm-project/pull/94528


More information about the cfe-commits mailing list