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

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 12:24:20 PDT 2020


jdenny added a comment.

> I'd expect 0x[[#%.8x, ADDR:]] to match 00001234 or FFFFFFFF12345678 but not 1234 due to there not being enough digits.

OK, it would expect a value that could have been printed by printf with `%.8x`.

> I guess it could be useful to check alignment in a tool but as I said my main motivation is keeping a common format specifier syntax for all numeric substitution blocks. Note that my regex was indeed wrong anyway, it should be (([1-9][0-9]+)?[0-9]{5}).

I think you want `+` to be `*` to permit `123456`.

What would happen on `012345`?  Would it match `01234` and leave `5` for a later directive, or would FileCheck fail immediately?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81667/new/

https://reviews.llvm.org/D81667





More information about the llvm-commits mailing list