[FileCheck] Add function call support to numerical expressions.
authorPaul Walker <paul.walker@arm.com>
Thu, 14 May 2020 10:32:58 +0000 (10:32 +0000)
committerPaul Walker <paul.walker@arm.com>
Wed, 10 Jun 2020 09:42:00 +0000 (09:42 +0000)
commit8fd2270370244f0e93b4fd9ac4e13473f3cd7dd7
tree1faa261f2e7271d28645c595dce9c789e07d59d9
parentf2c8f6e16d25ca356f58995109292735b222b1b7
[FileCheck] Add function call support to numerical expressions.

This patch extends numerical expressions to allow calls to
predefined functions. These calls can be combined with the
existing numerical operators, which includes nesting calls.

The call syntax is:

  <func>(<args>)

Where <func> is a predefined string literal, currently limited to
one of add, max, min and sub. <arg> is a comma seperated list of
numerical expressions.

Subscribers: arichardson, hiraditya, thopre, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79936
llvm/docs/CommandGuide/FileCheck.rst
llvm/lib/Support/FileCheck.cpp
llvm/lib/Support/FileCheckImpl.h
llvm/test/FileCheck/numeric-expression.txt
llvm/unittests/Support/FileCheckTest.cpp