Skip to content

[NFC] Return optional in Lexer::peek - #8737

Merged
tlively merged 3 commits into
mainfrom
lexer-peek-optional
May 20, 2026
Merged

[NFC] Return optional in Lexer::peek#8737
tlively merged 3 commits into
mainfrom
lexer-peek-optional

Conversation

@tlively

@tlively tlively commented May 20, 2026

Copy link
Copy Markdown
Member

This prevents errors where we peek the buffer without checking that there is more input to peek at.

tlively added 2 commits May 20, 2026 11:50
Fix an OOB string_view access that was just trying to get a one-past-the-end pointer. Fix two locations where we could have been peeking empty input.

Fixes #8732.
This prevents errors where we peek the buffer without checking that there is more input to peek at.
@tlively
tlively requested a review from a team as a code owner May 20, 2026 20:46
@tlively
tlively requested review from aheejin and stevenfontanella and removed request for a team May 20, 2026 20:46
Base automatically changed from fix-8732 to main May 20, 2026 21:04
@tlively
tlively enabled auto-merge (squash) May 20, 2026 21:39
@tlively
tlively merged commit 355af66 into main May 20, 2026
16 checks passed
@tlively
tlively deleted the lexer-peek-optional branch May 20, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants