[PATCH] D118833: [FormatVariadic] Mark index as required in docstring
Dave Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 2 11:00:14 PST 2022
kastiglione created this revision.
kastiglione added a reviewer: zturner.
Herald added subscribers: dexonsmith, arphaman.
kastiglione requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
After looking at the formatv docstring, I thought the index was optional (as it
is in other languages). This changes the header docs to show `index` instead of
`[index]`, to indicate that it is required.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118833
Files:
llvm/include/llvm/Support/FormatVariadic.h
Index: llvm/include/llvm/Support/FormatVariadic.h
===================================================================
--- llvm/include/llvm/Support/FormatVariadic.h
+++ llvm/include/llvm/Support/FormatVariadic.h
@@ -172,7 +172,7 @@
// Formats textual output. `Fmt` is a string consisting of one or more
// replacement sequences with the following grammar:
//
-// rep_field ::= "{" [index] ["," layout] [":" format] "}"
+// rep_field ::= "{" index ["," layout] [":" format] "}"
// index ::= <non-negative integer>
// layout ::= [[[char]loc]width]
// format ::= <any string not containing "{" or "}">
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118833.405367.patch
Type: text/x-patch
Size: 616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220202/897b6e52/attachment.bin>
More information about the llvm-commits
mailing list