================ @@ -1491,6 +1491,46 @@ FuzzyFindRequest speculativeFuzzyFindRequestForCompletion( return CachedReq; } +// This function is similar to Lexer::findNextToken(), but assumes +// that the input SourceLocation is the completion point (which is +// a case findNextToken() does not handle). +std::optional<Token> +findTokenAfterCompletionPoint(SourceLocation CompletionPoint, + const SourceManager &SM, + const LangOptions &LangOpts) { + SourceLocation Loc = CompletionPoint; ---------------- HighCommander4 wrote:
> do you think it's possible to make this function a static member of `Lexer` > like `Lexer::findNextToken`? That way we might need a slight refactor to > reuse some common logics. I think this would be a good improvement, but I'd like to leave it to a follow-up patch, because it involves adding new public API to `clang/Lex/Lexer.h`, so it should probably be approved by a code owner of the Lexer component. https://github.com/llvm/llvm-project/pull/69153 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits