[clang] d66dbd6 - [clang][doc] Document C2y flags (#138521)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 6 01:20:00 PDT 2025


Author: Raul Tambre
Date: 2025-05-06T11:19:57+03:00
New Revision: d66dbd6931a4358c0e4fd7c749179aa229fb36a4

URL: https://github.com/llvm/llvm-project/commit/d66dbd6931a4358c0e4fd7c749179aa229fb36a4
DIFF: https://github.com/llvm/llvm-project/commit/d66dbd6931a4358c0e4fd7c749179aa229fb36a4.diff

LOG: [clang][doc] Document C2y flags (#138521)

As discussed at https://github.com/llvm/llvm-project/pull/138459#issuecomment-2850716184

Added: 
    

Modified: 
    clang/docs/CommandGuide/clang.rst
    clang/include/clang/Basic/LangStandards.def

Removed: 
    


################################################################################
diff  --git a/clang/docs/CommandGuide/clang.rst b/clang/docs/CommandGuide/clang.rst
index e3399d39bf00c..1b8776c5e9ad2 100644
--- a/clang/docs/CommandGuide/clang.rst
+++ b/clang/docs/CommandGuide/clang.rst
@@ -155,6 +155,14 @@ Language Selection and Mode Options
 
    ISO C 2023 with GNU extensions
 
+  | ``c2y``
+
+   ISO C 202y
+
+  | ``gnu2y``
+
+   ISO C 202y with GNU extensions
+
  The default C language standard is ``gnu17``, except on PS4, where it is
  ``gnu99``.
 

diff  --git a/clang/include/clang/Basic/LangStandards.def b/clang/include/clang/Basic/LangStandards.def
index 49cd9881829d4..244692ab4296a 100644
--- a/clang/include/clang/Basic/LangStandards.def
+++ b/clang/include/clang/Basic/LangStandards.def
@@ -105,7 +105,7 @@ LANGSTANDARD(c2y, "c2y",
 LANGSTANDARD(gnu2y, "gnu2y",
              C, "Working Draft for ISO C2y with GNU extensions",
              LineComment | C99 | C11 | C17 | C23 | C2y | Digraphs | GNUMode | HexFloat)
-
+// TODO: Add the iso9899:202y alias once ISO publishes the standard.
 
 // C++ modes
 LANGSTANDARD(cxx98, "c++98",


        


More information about the cfe-commits mailing list