1 //===-- LangStandards.def - Language Standard Data --------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 #error "LANGSTANDARD must be defined before including this file"
14 /// LANGSTANDARD(IDENT, NAME, LANG, DESC, FEATURES)
16 /// \param IDENT - The name of the standard as a C++ identifier.
17 /// \param NAME - The name of the standard.
18 /// \param LANG - The InputKind::Language for which this is a standard.
19 /// \param DESC - A short description of the standard.
20 /// \param FEATURES - The standard features as flags, these are enums from the
21 /// clang::frontend namespace, which is assumed to be be available.
23 /// LANGSTANDARD_ALIAS(IDENT, ALIAS)
24 /// \param IDENT - The name of the standard as a C++ identifier.
25 /// \param ALIAS - The alias of the standard.
27 /// LANGSTANDARD_ALIAS_DEPR(IDENT, ALIAS)
28 /// Same as LANGSTANDARD_ALIAS, but for a deprecated alias.
30 #ifndef LANGSTANDARD_ALIAS
31 #define LANGSTANDARD_ALIAS(IDENT, ALIAS)
34 #ifndef LANGSTANDARD_ALIAS_DEPR
35 #define LANGSTANDARD_ALIAS_DEPR(IDENT, ALIAS) LANGSTANDARD_ALIAS(IDENT, ALIAS)
39 LANGSTANDARD(c89, "c89",
42 LANGSTANDARD_ALIAS(c89, "c90")
43 LANGSTANDARD_ALIAS(c89, "iso9899:1990")
45 LANGSTANDARD(c94, "iso9899:199409",
46 C, "ISO C 1990 with amendment 1",
47 Digraphs | ImplicitInt)
49 LANGSTANDARD(gnu89, "gnu89",
50 C, "ISO C 1990 with GNU extensions",
51 LineComment | Digraphs | GNUMode | ImplicitInt)
52 LANGSTANDARD_ALIAS(gnu89, "gnu90")
55 LANGSTANDARD(c99, "c99",
57 LineComment | C99 | Digraphs | HexFloat)
58 LANGSTANDARD_ALIAS(c99, "iso9899:1999")
59 LANGSTANDARD_ALIAS_DEPR(c99, "c9x")
60 LANGSTANDARD_ALIAS_DEPR(c99, "iso9899:199x")
62 LANGSTANDARD(gnu99, "gnu99",
63 C, "ISO C 1999 with GNU extensions",
64 LineComment | C99 | Digraphs | GNUMode | HexFloat)
65 LANGSTANDARD_ALIAS_DEPR(gnu99, "gnu9x")
68 LANGSTANDARD(c11, "c11",
70 LineComment | C99 | C11 | Digraphs | HexFloat)
71 LANGSTANDARD_ALIAS(c11, "iso9899:2011")
72 LANGSTANDARD_ALIAS_DEPR(c11, "c1x")
73 LANGSTANDARD_ALIAS_DEPR(c11, "iso9899:201x")
75 LANGSTANDARD(gnu11, "gnu11",
76 C, "ISO C 2011 with GNU extensions",
77 LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)
78 LANGSTANDARD_ALIAS_DEPR(gnu11, "gnu1x")
81 LANGSTANDARD(c17, "c17",
83 LineComment | C99 | C11 | C17 | Digraphs | HexFloat)
84 LANGSTANDARD_ALIAS(c17, "iso9899:2017")
85 LANGSTANDARD_ALIAS(c17, "c18")
86 LANGSTANDARD_ALIAS(c17, "iso9899:2018")
87 LANGSTANDARD(gnu17, "gnu17",
88 C, "ISO C 2017 with GNU extensions",
89 LineComment | C99 | C11 | C17 | Digraphs | GNUMode | HexFloat)
90 LANGSTANDARD_ALIAS(gnu17, "gnu18")
93 LANGSTANDARD(cxx98, "c++98",
94 CXX, "ISO C++ 1998 with amendments",
95 LineComment | CPlusPlus | Digraphs)
96 LANGSTANDARD_ALIAS(cxx98, "c++03")
98 LANGSTANDARD(gnucxx98, "gnu++98",
99 CXX, "ISO C++ 1998 with amendments and GNU extensions",
100 LineComment | CPlusPlus | Digraphs | GNUMode)
101 LANGSTANDARD_ALIAS(gnucxx98, "gnu++03")
103 LANGSTANDARD(cxx11, "c++11",
104 CXX, "ISO C++ 2011 with amendments",
105 LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
106 LANGSTANDARD_ALIAS_DEPR(cxx11, "c++0x")
108 LANGSTANDARD(gnucxx11, "gnu++11", CXX,
109 "ISO C++ 2011 with amendments and GNU extensions",
110 LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
111 LANGSTANDARD_ALIAS_DEPR(gnucxx11, "gnu++0x")
113 LANGSTANDARD(cxx14, "c++14",
114 CXX, "ISO C++ 2014 with amendments",
115 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
116 LANGSTANDARD_ALIAS_DEPR(cxx14, "c++1y")
118 LANGSTANDARD(gnucxx14, "gnu++14",
119 CXX, "ISO C++ 2014 with amendments and GNU extensions",
120 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
122 LANGSTANDARD_ALIAS_DEPR(gnucxx14, "gnu++1y")
124 LANGSTANDARD(cxx17, "c++17",
125 CXX, "ISO C++ 2017 with amendments",
126 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
128 LANGSTANDARD_ALIAS_DEPR(cxx17, "c++1z")
130 LANGSTANDARD(gnucxx17, "gnu++17",
131 CXX, "ISO C++ 2017 with amendments and GNU extensions",
132 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
133 Digraphs | HexFloat | GNUMode)
134 LANGSTANDARD_ALIAS_DEPR(gnucxx17, "gnu++1z")
136 LANGSTANDARD(cxx2a, "c++2a",
137 CXX, "Working draft for ISO C++ 2020",
138 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
139 CPlusPlus2a | Digraphs | HexFloat)
141 LANGSTANDARD(gnucxx2a, "gnu++2a",
142 CXX, "Working draft for ISO C++ 2020 with GNU extensions",
143 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
144 CPlusPlus2a | Digraphs | HexFloat | GNUMode)
147 LANGSTANDARD(opencl10, "cl1.0",
148 OpenCL, "OpenCL 1.0",
149 LineComment | C99 | Digraphs | HexFloat | OpenCL)
150 LANGSTANDARD_ALIAS_DEPR(opencl10, "cl")
152 LANGSTANDARD(opencl11, "cl1.1",
153 OpenCL, "OpenCL 1.1",
154 LineComment | C99 | Digraphs | HexFloat | OpenCL)
155 LANGSTANDARD(opencl12, "cl1.2",
156 OpenCL, "OpenCL 1.2",
157 LineComment | C99 | Digraphs | HexFloat | OpenCL)
158 LANGSTANDARD(opencl20, "cl2.0",
159 OpenCL, "OpenCL 2.0",
160 LineComment | C99 | Digraphs | HexFloat | OpenCL)
161 LANGSTANDARD(openclcpp, "c++",
162 OpenCL, "OpenCL C++ 1.0",
163 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs | OpenCL)
165 LANGSTANDARD_ALIAS_DEPR(opencl10, "CL")
166 LANGSTANDARD_ALIAS_DEPR(opencl11, "CL1.1")
167 LANGSTANDARD_ALIAS_DEPR(opencl12, "CL1.2")
168 LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0")
171 LANGSTANDARD(cuda, "cuda", CUDA, "NVIDIA CUDA(tm)",
172 LineComment | CPlusPlus | Digraphs)
175 LANGSTANDARD(hip, "hip", HIP, "HIP",
176 LineComment | CPlusPlus | Digraphs)
179 #undef LANGSTANDARD_ALIAS
180 #undef LANGSTANDARD_ALIAS_DEPR