rsmith added a comment. Exposing this information seems fine to me. I think it'd be more useful to expose it in a way the preprocessor can inspect, but it's hard to see how to do that without requiring us to invent identifier-shaped names for all encodings, and perhaps we shouldn't be in the business of doing that. If this string literal approach addresses the use cases you have, then I think that's OK.
================ Comment at: clang/test/Preprocessor/init.c:122-123 // COMMON:#define __clang_version__ {{.*}} +// COMMON:#define __clang_literal_encoding__ {{.*}} +// COMMON:#define __clang_wide_literal_encoding__ {{.*}} // COMMON:#define __llvm__ 1 ---------------- Please add documentation to `docs/LanguageExtensions.rst` for these. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100346/new/ https://reviews.llvm.org/D100346 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits