[llvm] [Support] Do not ignore unterminated open { in formatv (PR #104688)
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 04:10:37 PDT 2024
================
@@ -107,15 +107,18 @@ formatv_object_base::splitLiteralAndReplacement(StringRef Fmt) {
StringRef Right = Fmt.drop_front(NumEscapedBraces * 2);
return std::make_pair(ReplacementItem{Middle}, Right);
}
- // An unterminated open brace is undefined. We treat the rest of the string
- // as a literal replacement, but we assert to indicate that this is
- // undefined and that we consider it an error.
+ // An unterminated open brace is undefined. Assert to indicate that this is
+ // undefined and that we consider it an error. When asserts are disabled,
+ // built a replacement item with an error message.
----------------
d0k wrote:
typo: build
https://github.com/llvm/llvm-project/pull/104688
More information about the llvm-commits
mailing list