[PATCH] D45906: [Sanitizer] Internal Printf string width + left-justify.

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 20 15:52:07 PDT 2018


alekseyshl created this revision.
alekseyshl added a reviewer: eugenis.
Herald added subscribers: Sanitizers, delcypher, kubamracek.

Example:

  Printf("%-5s", "123");

should yield:

  '123  '

In case Printf's requested string field width is larger than the string
argument length, the resulting string should be padded up to the requested
width.

For the simplicity sake, implementing left-justified (right padding) only.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D45906

Files:
  lib/sanitizer_common/sanitizer_printf.cc
  lib/sanitizer_common/tests/sanitizer_printf_test.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45906.143403.patch
Type: text/x-patch
Size: 4059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180420/ffb40f95/attachment.bin>


More information about the llvm-commits mailing list