[PATCH] D60384: FileCheck [4/12]: Introduce @LINE numeric expressions

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 7 16:22:41 PDT 2019


thopre created this revision.
thopre added reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
thopre added a parent revision: D60383: FileCheck [3/12]: Stricter parsing of @LINE expressions.
thopre added a child revision: D60385: FileCheck [5/12]: Introduce regular numeric variables.

This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch introduces the @LINE numeric
expressions.

This commit introduces a new syntax to express a relation a numeric
value in the input text must have with the line number of a given CHECK
pattern: #<@LINE numeric expression>. Further commits build on that
to express relations between several numeric values in the input text.
To help with naming, regular variables are renamed into pattern
variables and old @LINE expression syntax is referred to as legacy
numeric expression.

Compared to existing @LINE expressions, this new syntax allow arbitrary
spacing between the component of the expression. It offers otherwise the
same functionality but the commit serves to introduce some of the data
structure needed to support more general numeric expressions.

Copyright:

- Linaro (changes up to diff 183612 of revision D55940 <https://reviews.llvm.org/D55940>)
- GraphCore (changes in later versions of revision D55940 <https://reviews.llvm.org/D55940> and in new revision created off D55940 <https://reviews.llvm.org/D55940>)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D60384

Files:
  llvm/docs/CommandGuide/FileCheck.rst
  llvm/include/llvm/Support/FileCheck.h
  llvm/lib/Support/FileCheck.cpp
  llvm/test/FileCheck/line-count.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60384.194079.patch
Type: text/x-patch
Size: 30900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190407/859d00b8/attachment-0001.bin>


More information about the llvm-commits mailing list