[llvm] 948d69f - [FormatVariadic] Mark index as required in docstring

Dave Lee via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 15:33:48 PST 2022


Author: Dave Lee
Date: 2022-02-23T15:33:36-08:00
New Revision: 948d69fd574fbbbc311d06c5c4481408ef4e384d

URL: https://github.com/llvm/llvm-project/commit/948d69fd574fbbbc311d06c5c4481408ef4e384d
DIFF: https://github.com/llvm/llvm-project/commit/948d69fd574fbbbc311d06c5c4481408ef4e384d.diff

LOG: [FormatVariadic] Mark index as required in docstring

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.

Differential Revision: https://reviews.llvm.org/D118833

Added: 
    

Modified: 
    llvm/include/llvm/Support/FormatVariadic.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/FormatVariadic.h b/llvm/include/llvm/Support/FormatVariadic.h
index a872afb5e45e5..c1707b4fe9cb9 100644
--- a/llvm/include/llvm/Support/FormatVariadic.h
+++ b/llvm/include/llvm/Support/FormatVariadic.h
@@ -172,7 +172,7 @@ template <typename Tuple> class formatv_object : public formatv_object_base {
 // 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 "}">


        


More information about the llvm-commits mailing list