================
@@ -120,13 +125,17 @@ static PrintfSpecifierResult
ParsePrintfSpecifier(FormatStringHandler &H,
return true;
}
- if (*I == '{') {
+ if (FormatStrConverter.convert(*I) == '{') {
++I;
unsigned char PrivacyFlags = 0;
StringRef MatchedStr;
do {
- StringRef Str(I, E - I);
+ const char *II;
+ std::string S(I, E - I);
+ for (unsigned long i = 0; i < S.length(); ++i)
+ S[i] = FormatStrConverter.convert(S[i]);
+ StringRef Str(S);
std::string Match = "^[[:space:]]*"
----------------
s-barannikov wrote:
I wish we could guard the whole block by Objective-C check rather than do the
conversion here. AFAIK `os_log`/`__builtin_os_log_format` that take this path
only support UTF-8 encoded strings. Although I know little about Objective-C
and may be wrong.
https://github.com/llvm/llvm-project/pull/169803
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits