================
@@ -17,11 +17,29 @@
#include "clang/AST/ASTContext.h"
#include "clang/AST/FormatString.h"
#include "clang/AST/Type.h"
+#include "clang/Basic/TargetInfo.h"
+#include "llvm/Support/TextEncoding.h"
namespace clang {
class LangOptions;
+/// Creates a TextEncodingConverter for format string character comparisons.
+/// On z/OS format strings are IBM-1047 encoded, so each byte must be converted
----------------
hubert-reinterpretcast wrote:
z/OS format strings are locale-dependent as with other platforms. In
particular, "\u{e29b}\n" in IBM-939 appears as the byte sequence corresponding
to "\x0E%s\x0F\n" but, under the appropriate locale, merely prints as that
sequence of bytes.
This PR is making changes in the expectations users can have with respect to
the interpretation of format strings and requires a documentation update. In
particular, it appears that interpretation is done without regard to the
literal encoding.
Note that the documentation should also account for the treatment of format
strings in `llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp`.
https://github.com/llvm/llvm-project/pull/196568
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits