[PATCH] D97845: [FileCheck] Add support for hex alternate form in FileCheck

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 02:54:02 PST 2021


thopre created this revision.
Herald added a subscriber: hiraditya.
thopre requested review of this revision.
Herald added a project: LLVM.

Add printf-style alternate form flag to prefix hex number with 0x when
present. This works on both empty numeric expression (e.g. variable
definition from input) and when matching a numeric expression. The
syntax is as follows:

[[#%#<precision specifier><format specifier>, ...]

where <precision specifier> and <format specifier> are optional and ...
can be a variable definition or not with an empty expression or not.

This feature was requested in https://reviews.llvm.org/D81144#2075532
for llvm/test/MC/ELF/gen-dwarf64.s


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97845

Files:
  llvm/docs/CommandGuide/FileCheck.rst
  llvm/lib/FileCheck/FileCheck.cpp
  llvm/lib/FileCheck/FileCheckImpl.h
  llvm/test/FileCheck/numeric-expression.txt
  llvm/unittests/FileCheck/FileCheckTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97845.327732.patch
Type: text/x-patch
Size: 20270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210303/fff918e3/attachment.bin>


More information about the llvm-commits mailing list