[PATCH] D81667: [RFC, FileCheck] Add precision to format specifier

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 08:47:04 PDT 2020


thopre created this revision.
thopre added reviewers: jhenderson, jdenny, probinson, grimar, arichardson.
thopre added a project: LLVM.
Herald added a subscriber: hiraditya.

This is a proof of concept patch to add support for precision in numeric
expression format specifier. I'm looking for feedback on 3 aspects:

- Should I allow to specify a precision without a conversion specifier, i.e. #%.8, VAR1? The conversion would thus be implicit.
- Should the regex wildcard for a numeric variable definition with empty expression also respect the precision, i.e. #%.5u, VAR2: would be matched by (([1-9][0-9]+)? [0-9]{1,5})
- Should the regex wildcard for a numeric variable definition with empty expression and no precision forbid leading zeros, i.e. #VAR3: would be matched by ([1-9]?[0-9]+) and existing testcase changed to not fail

I personally think the answer to the first two should be yes and the
last one should be no. Thoughts?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81667

Files:
  llvm/lib/Support/FileCheck.cpp
  llvm/lib/Support/FileCheckImpl.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81667.270159.patch
Type: text/x-patch
Size: 5080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200611/05bc80eb/attachment.bin>


More information about the llvm-commits mailing list