[all-commits] [llvm/llvm-project] 0e1fa9: [flang] Fix character initialization after continu...

Leandro Lupori via All-commits all-commits at lists.llvm.org
Thu Jun 1 12:49:06 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e1fa9174072a3b896533d151336884e4eb1486a
  Author: Leandro Lupori <leandro.lupori at linaro.org>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M flang/lib/Parser/token-sequence.cpp
    A flang/test/Parser/continuation-before-char.f90

  Log Message:
  [flang] Fix character initialization after continuation

The insertion of a space on a line continuation right before
a character literal was confusing TokenSequence::ToLowerCase(),
that was unable to identify the character literal as such,
causing it to be converted to lower case.

Fix this by skipping spaces in the beginning and end of each
token, before testing for token type.

Fixes https://github.com/llvm/llvm-project/issues/62039

Reviewed By: klausler

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

More information about the All-commits mailing list