llvm-project
309a3a0b - [MIR] Support +inf and -inf literals (#221127)

Commit
7 days ago
[MIR] Support +inf and -inf literals (#221127) Support parsing `+inf` and `-inf` as floating-point literals in MIR. The MIR lexer previously tokenized the leading sign separately, causing `G_FCONSTANT float +inf` and `G_FCONSTANT float -inf` to fail with "expected a floating point literal". Recognize signed infinity spellings as `FloatingPointLiteral` tokens so they can be handled by the existing floating-point constant parsing path. Add a regression test covering both positive and negative infinity. Fixes #221040 Assisted-by: ChatGPT (rubber ducking)
Author
Parents
Loading