[clang] Fix handling of asm string literals (PR #169803)

Abhina Sree via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 20 05:23:27 PDT 2026


================
@@ -245,7 +245,8 @@ ExprResult Sema::ActOnGCCAsmStmtString(Expr *Expr, bool ForAsmLabel) {
       Diag(Expr->getBeginLoc(), diag::err_asm_operand_empty_string)
           << SL->getSourceRange();
     }
-    if (Context.getTargetInfo().FromSystemEncodingConverter) {
+    if (Context.getTargetInfo().getDefaultOrdinaryLiteralEncoding() !=
----------------
abhina-sree wrote:

The previous version was causing CI errors in the next PR when I changed FromSystemEncodingConverter into a noop converter instead of a nullptr. So I wanted to prevent going down this codepath if the conversion is unnecessary.

https://github.com/llvm/llvm-project/pull/169803


More information about the cfe-commits mailing list