[clang] Add ParserConversionAction (PR #169803)

Sean Perry via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 07:54:41 PDT 2026


================
@@ -564,6 +564,9 @@ unsigned Parser::ParseAttributeArgsCommon(
               nullptr,
               Sema::ExpressionEvaluationContextRecord::EK_AttrArgument);
 
+          SaveAndRestore<ConversionAction> SavedTranslationState(
+              ParserConversionAction, CA_NoConversion);
----------------
perry-ca wrote:

We have a couple more XL pragmas that we plan to upstream as well that will handle this.  These are:
- `#pragma convert` - allows the programmer to choose the code page for a range of code (set/pop mechanism).  The code page name is the string.  XL did support a number but that would be platform dependent so don't plan on supporting that.
- `#pragma convlit` - suspends the exec-charset/convert code page and goes back to default.  This is more for XL compat than pure functionality.

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


More information about the cfe-commits mailing list