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

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 10:13:31 PDT 2020


thopre added a comment.

In D81667#2098537 <https://reviews.llvm.org/D81667#2098537>, @thopre wrote:

> In D81667#2098443 <https://reviews.llvm.org/D81667#2098443>, @jdenny wrote:
>
> > Can you give some example inputs and explain the intended matching behavior for `#%.5u, VAR2:`?  Why is this behavior needed in FileCheck but not in scanf?
>




> Besides whether this is a useful feature, it makes for easier parsing and consistency in the syntax (no difference between variables defined from an expression where the precision would be allowed and variables defined from an empty expression where precision would not be allowed).

I forgot to mention that scanf doesn't need this because it's separate from printf (weaker need for consistency) and I guess aims at parsing some value more than checking format.


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