summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorPeter Klausler <35819229+klausler@users.noreply.github.com>2024-08-26 10:54:03 -0700
committerGitHub <noreply@github.com>2024-08-26 10:54:03 -0700
commit047168dae79cd6e0087eb86810006c635f017df6 (patch)
treeb3690aab86dd9f8193ac9fc529e7d262f49304de /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentb52728d89bb44ec59fa60ec02e1a9cbdb86037e1 (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