[all-commits] [llvm/llvm-project] 189c08: [flang] Fix edge case with Hollerith

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Aug 10 11:32:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 189c0833dfd654f08a8655ca765e11e8890a92ae
      https://github.com/llvm/llvm-project/commit/189c0833dfd654f08a8655ca765e11e8890a92ae
  Author: peter klausler <pklausler at nvidia.com>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M flang/lib/Parser/prescan.cpp
    M flang/lib/Parser/prescan.h
    A flang/test/Preprocessing/hollerith.f

  Log Message:
  -----------
  [flang] Fix edge case with Hollerith

To prevent mistokenization of CHARACTER*2HXY as a Hollerith
literal constant while allowing it in DATA A/2*2HXY/, there's
a little state that tracks whether a / has been seen earlier
in the same statement.  But it was being reset on each line,
not statement, so Hollerith in a DATA statement continuation
line was incorrectly tokenized.  Fixed.

Differential Revision: https://reviews.llvm.org/D85571




More information about the All-commits mailing list