From f9e2a62cc594c96194908a3ac4804caa07f86ba6 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Thu, 11 Jun 2020 16:14:24 +0100 Subject: [FileCheck] Add support for hex alternate form in FileCheck 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: [[#%#, ...] where and 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 Reviewed By: jdenny Differential Revision: https://reviews.llvm.org/D97845 --- llvm/docs/CommandGuide/FileCheck.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'llvm/docs/CommandGuide/FileCheck.rst') diff --git a/llvm/docs/CommandGuide/FileCheck.rst b/llvm/docs/CommandGuide/FileCheck.rst index 398cce1..a4e3e06 100644 --- a/llvm/docs/CommandGuide/FileCheck.rst +++ b/llvm/docs/CommandGuide/FileCheck.rst @@ -773,8 +773,11 @@ The syntax to capture a numeric value is * ``:`` is an optional definition of variable ```` from the captured value. -The syntax of ```` is: ``.`` where: +The syntax of ```` is: ``#.`` where: +* ``#`` is an optional flag available for hex values (see + ```` below) which requires the value matched to be + prefixed by ``0x``. * ``.`` is an optional printf-style precision specifier in which ```` indicates the minimum number of digits that the value matched must have, expecting leading zeros if needed. -- cgit v1.1