================ @@ -1354,6 +1354,8 @@ maybeFindIncludeReferences(ParsedAST &AST, Position Pos, ReferencesResult::Reference Result; const auto *Token = AST.getTokens().spelledTokenAt(Loc); + if (!Token) ---------------- kadircet wrote:
thanks! can you also rename `spelledTokenAt` to `spelledTokenCotaining` and update the comment and change the null-check here to an assertion? also, what's the conclusion of investigation around `don't really rely on spelledTokenAt failing when it's called with a random offset into the token`? https://github.com/llvm/llvm-project/pull/94528 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits