[PATCH] D83888: [LLVM] Update formatv() documentation to clarify no escape for `}`

Rahul Joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 08:06:20 PDT 2020


jurahul marked 4 inline comments as done.
jurahul added inline comments.


================
Comment at: llvm/lib/Support/FormatVariadic.cpp:94
 formatv_object_base::splitLiteralAndReplacement(StringRef Fmt) {
-  std::size_t From = 0;
-  while (From < Fmt.size() && From != StringRef::npos) {
-    std::size_t BO = Fmt.find_first_of('{', From);
+  while (!Fmt.empty()) {
     // Everything up until the first brace is a literal.
----------------
sammccall wrote:
> this simplification seems fine to me, but it does seem confusing to combine a change in contract with a change in implementation but no change in behavior.
> 
> I'd suggest making these two separate patches, but up to you.
That makes sense. I'll start a new review for changes in this file. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83888





More information about the llvm-commits mailing list