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

Done.
> 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?

I relied on the tests here. Also, the usages of `spelledTokenCotaining` does 
not seem to relying on getting a `nullptr` if the location is inside a token, 
as compared to strictly at the beginning of tok.

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

Reply via email to