[clang] [clang] Fix handling of asm string literals (PR #169803)
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 8 13:48:01 PDT 2026
================
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple s390x-none-zos -fexec-charset IBM-1047 %s -std=c++23 -fsyntax-only -verify
+// RUN: %clang_cc1 -triple s390x-none-zos -fexec-charset UTF-8 %s -std=c++23 -fsyntax-only -verify
+
+long inline_asm_ucn_named_operand(long a, long b) {
+ // The \N{...} escape encodes to U+0130. IBM-1047 has no code point for
+ // U+0130, so the conversion reports an error.
+ asm("\tLGR %0, %[\N{LATIN CAPITAL LETTER I WITH DOT ABOVE}]\n" // expected-error-re {{encoding conversion failed: {{.*}}}}
----------------
hubert-reinterpretcast wrote:
> Where would be a good place to document this?
Not great, but somewhere in https://clang.llvm.org/docs/LanguageExtensions.html would at least make sense.
https://github.com/llvm/llvm-project/pull/169803
More information about the cfe-commits
mailing list