[all-commits] [llvm/llvm-project] 058455: [FileCheck] Fix PR49531: invalid use of string var

RoboTux via All-commits all-commits at lists.llvm.org
Wed Mar 24 11:50:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 058455ffbec13bd1bc468a0206b9e3a95dc4b8c8
      https://github.com/llvm/llvm-project/commit/058455ffbec13bd1bc468a0206b9e3a95dc4b8c8
  Author: Thomas Preud'homme <thomasp at graphcore.ai>
  Date:   2021-03-24 (Wed, 24 Mar 2021)

  Changed paths:
    M llvm/lib/FileCheck/FileCheck.cpp
    M llvm/test/FileCheck/simple-var-capture.txt
    M llvm/unittests/FileCheck/FileCheckTest.cpp

  Log Message:
  -----------
  [FileCheck] Fix PR49531: invalid use of string var

FileCheck string substitution block parsing code only report an invalid
variable name in a string variable use if it starts with a forbidden
character. It does not report anything if there are unparsed characters
after the variable name, i.e. [[X-Y]] is parsed as [[X]] and no error is
returned. This commit fixes that.

Reviewed By: jdenny, jhenderson

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




More information about the All-commits mailing list