[clang] [clang][Basic] Add helper APIs to get language version codes from LangOptions (PR #163348)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 14 08:17:09 PDT 2025
================
@@ -184,6 +184,28 @@ class LangOptionsBase {
HLSL_202y = 2029,
};
+ /// C language version codes as defined by the standard.
+ enum CLangStd : uint32_t {
+ // FIXME: Use correct value for C2y.
+ C_2y = 202400,
+ C_23 = 202311,
+ C_17 = 201710,
+ C_11 = 201112,
+ C_99 = 199901,
+ };
+
+ /// C++ language version codes as defined by the standard.
+ enum CPlusPlusLangStd : uint32_t {
+ // FIXME: Use correct value for C++26.
+ CPP_26 = 202400,
----------------
AaronBallman wrote:
`Cpp26` or `Cxx26` instead of the underscore?
https://github.com/llvm/llvm-project/pull/163348
More information about the cfe-commits
mailing list