diff options
| author | Peter Klausler <35819229+klausler@users.noreply.github.com> | 2024-08-26 10:54:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 10:54:03 -0700 |
| commit | 047168dae79cd6e0087eb86810006c635f017df6 (patch) | |
| tree | b3690aab86dd9f8193ac9fc529e7d262f49304de /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | b52728d89bb44ec59fa60ec02e1a9cbdb86037e1 (diff) | |
[flang] Fix parser crash (#105875)
The production for a bare file unit number in an I/O statement checks
that the scalar integer expression isn't followed by "=", in order to
disambiguate FLUSHN from FLUSHN=1, and to not treat a control specifier
keyword as an integer expression. The implementation of this check used
!"="_tok, which has the side effect of producing no error message; this
can lead to a parsing crash later when a failed parse of an erroneous
program is found to have produced no errors. Rewrite as a lookAhead call
for those characters that acually can follow a bare unit number.
Fixes https://github.com/llvm/llvm-project/issues/105779.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
