Warning: That file was not part of the compilation database. It may have many parsing errors.

1//===-- LangStandards.def - Language Standard Data --------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LANGSTANDARD
11#error "LANGSTANDARD must be defined before including this file"
12#endif
13
14/// LANGSTANDARD(IDENT, NAME, LANG, DESC, FEATURES)
15///
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.
22
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.
26
27/// LANGSTANDARD_ALIAS_DEPR(IDENT, ALIAS)
28/// Same as LANGSTANDARD_ALIAS, but for a deprecated alias.
29
30#ifndef LANGSTANDARD_ALIAS
31#define LANGSTANDARD_ALIAS(IDENT, ALIAS)
32#endif
33
34#ifndef LANGSTANDARD_ALIAS_DEPR
35#define LANGSTANDARD_ALIAS_DEPR(IDENT, ALIAS) LANGSTANDARD_ALIAS(IDENT, ALIAS)
36#endif
37
38// C89-ish modes.
39LANGSTANDARD(c89, "c89",
40 C, "ISO C 1990",
41 ImplicitInt)
42LANGSTANDARD_ALIAS(c89, "c90")
43LANGSTANDARD_ALIAS(c89, "iso9899:1990")
44
45LANGSTANDARD(c94, "iso9899:199409",
46 C, "ISO C 1990 with amendment 1",
47 Digraphs | ImplicitInt)
48
49LANGSTANDARD(gnu89, "gnu89",
50 C, "ISO C 1990 with GNU extensions",
51 LineComment | Digraphs | GNUMode | ImplicitInt)
52LANGSTANDARD_ALIAS(gnu89, "gnu90")
53
54// C99-ish modes
55LANGSTANDARD(c99, "c99",
56 C, "ISO C 1999",
57 LineComment | C99 | Digraphs | HexFloat)
58LANGSTANDARD_ALIAS(c99, "iso9899:1999")
59LANGSTANDARD_ALIAS_DEPR(c99, "c9x")
60LANGSTANDARD_ALIAS_DEPR(c99, "iso9899:199x")
61
62LANGSTANDARD(gnu99, "gnu99",
63 C, "ISO C 1999 with GNU extensions",
64 LineComment | C99 | Digraphs | GNUMode | HexFloat)
65LANGSTANDARD_ALIAS_DEPR(gnu99, "gnu9x")
66
67// C11 modes
68LANGSTANDARD(c11, "c11",
69 C, "ISO C 2011",
70 LineComment | C99 | C11 | Digraphs | HexFloat)
71LANGSTANDARD_ALIAS(c11, "iso9899:2011")
72LANGSTANDARD_ALIAS_DEPR(c11, "c1x")
73LANGSTANDARD_ALIAS_DEPR(c11, "iso9899:201x")
74
75LANGSTANDARD(gnu11, "gnu11",
76 C, "ISO C 2011 with GNU extensions",
77 LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)
78LANGSTANDARD_ALIAS_DEPR(gnu11, "gnu1x")
79
80// C17 modes
81LANGSTANDARD(c17, "c17",
82 C, "ISO C 2017",
83 LineComment | C99 | C11 | C17 | Digraphs | HexFloat)
84LANGSTANDARD_ALIAS(c17, "iso9899:2017")
85LANGSTANDARD(gnu17, "gnu17",
86 C, "ISO C 2017 with GNU extensions",
87 LineComment | C99 | C11 | C17 | Digraphs | GNUMode | HexFloat)
88
89// C++ modes
90LANGSTANDARD(cxx98, "c++98",
91 CXX, "ISO C++ 1998 with amendments",
92 LineComment | CPlusPlus | Digraphs)
93LANGSTANDARD_ALIAS(cxx98, "c++03")
94
95LANGSTANDARD(gnucxx98, "gnu++98",
96 CXX, "ISO C++ 1998 with amendments and GNU extensions",
97 LineComment | CPlusPlus | Digraphs | GNUMode)
98LANGSTANDARD_ALIAS(gnucxx98, "gnu++03")
99
100LANGSTANDARD(cxx11, "c++11",
101 CXX, "ISO C++ 2011 with amendments",
102 LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
103LANGSTANDARD_ALIAS_DEPR(cxx11, "c++0x")
104
105LANGSTANDARD(gnucxx11, "gnu++11", CXX,
106 "ISO C++ 2011 with amendments and GNU extensions",
107 LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
108LANGSTANDARD_ALIAS_DEPR(gnucxx11, "gnu++0x")
109
110LANGSTANDARD(cxx14, "c++14",
111 CXX, "ISO C++ 2014 with amendments",
112 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
113LANGSTANDARD_ALIAS_DEPR(cxx14, "c++1y")
114
115LANGSTANDARD(gnucxx14, "gnu++14",
116 CXX, "ISO C++ 2014 with amendments and GNU extensions",
117 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
118 GNUMode)
119LANGSTANDARD_ALIAS_DEPR(gnucxx14, "gnu++1y")
120
121LANGSTANDARD(cxx17, "c++17",
122 CXX, "ISO C++ 2017 with amendments",
123 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
124 Digraphs | HexFloat)
125LANGSTANDARD_ALIAS_DEPR(cxx17, "c++1z")
126
127LANGSTANDARD(gnucxx17, "gnu++17",
128 CXX, "ISO C++ 2017 with amendments and GNU extensions",
129 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
130 Digraphs | HexFloat | GNUMode)
131LANGSTANDARD_ALIAS_DEPR(gnucxx17, "gnu++1z")
132
133LANGSTANDARD(cxx2a, "c++2a",
134 CXX, "Working draft for ISO C++ 2020",
135 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
136 CPlusPlus2a | Digraphs | HexFloat)
137
138LANGSTANDARD(gnucxx2a, "gnu++2a",
139 CXX, "Working draft for ISO C++ 2020 with GNU extensions",
140 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus17 |
141 CPlusPlus2a | Digraphs | HexFloat | GNUMode)
142
143// OpenCL
144LANGSTANDARD(opencl10, "cl1.0",
145 OpenCL, "OpenCL 1.0",
146 LineComment | C99 | Digraphs | HexFloat | OpenCL)
147LANGSTANDARD_ALIAS_DEPR(opencl10, "cl")
148
149LANGSTANDARD(opencl11, "cl1.1",
150 OpenCL, "OpenCL 1.1",
151 LineComment | C99 | Digraphs | HexFloat | OpenCL)
152LANGSTANDARD(opencl12, "cl1.2",
153 OpenCL, "OpenCL 1.2",
154 LineComment | C99 | Digraphs | HexFloat | OpenCL)
155LANGSTANDARD(opencl20, "cl2.0",
156 OpenCL, "OpenCL 2.0",
157 LineComment | C99 | Digraphs | HexFloat | OpenCL)
158LANGSTANDARD(openclcpp, "c++",
159 OpenCL, "OpenCL C++ 1.0",
160 LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs | OpenCL)
161
162LANGSTANDARD_ALIAS_DEPR(opencl10, "CL")
163LANGSTANDARD_ALIAS_DEPR(opencl11, "CL1.1")
164LANGSTANDARD_ALIAS_DEPR(opencl12, "CL1.2")
165LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0")
166
167// CUDA
168LANGSTANDARD(cuda, "cuda", CUDA, "NVIDIA CUDA(tm)",
169 LineComment | CPlusPlus | Digraphs)
170
171// HIP
172LANGSTANDARD(hip, "hip", HIP, "HIP",
173 LineComment | CPlusPlus | Digraphs)
174
175#undef LANGSTANDARD
176#undef LANGSTANDARD_ALIAS
177#undef LANGSTANDARD_ALIAS_DEPR
178

Warning: That file was not part of the compilation database. It may have many parsing errors.