]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def
Merge ACPICA 20170929 (take 2).
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Frontend / LangStandards.def
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.
39 LANGSTANDARD(c89, "c89",
40              C, "ISO C 1990",
41              ImplicitInt)
42 LANGSTANDARD_ALIAS(c89, "c90")
43 LANGSTANDARD_ALIAS(c89, "iso9899:1990")
44
45 LANGSTANDARD(c94, "iso9899:199409",
46              C, "ISO C 1990 with amendment 1",
47              Digraphs | ImplicitInt)
48
49 LANGSTANDARD(gnu89, "gnu89",
50              C, "ISO C 1990 with GNU extensions",
51              LineComment | Digraphs | GNUMode | ImplicitInt)
52 LANGSTANDARD_ALIAS(gnu89, "gnu90")
53
54 // C99-ish modes
55 LANGSTANDARD(c99, "c99",
56              C, "ISO C 1999",
57              LineComment | C99 | Digraphs | HexFloat)
58 LANGSTANDARD_ALIAS(c99, "iso9899:1999")
59 LANGSTANDARD_ALIAS_DEPR(c99, "c9x")
60 LANGSTANDARD_ALIAS_DEPR(c99, "iso9899:199x")
61
62 LANGSTANDARD(gnu99, "gnu99",
63              C, "ISO C 1999 with GNU extensions",
64              LineComment | C99 | Digraphs | GNUMode | HexFloat)
65 LANGSTANDARD_ALIAS_DEPR(gnu99, "gnu9x")
66
67 // C11 modes
68 LANGSTANDARD(c11, "c11",
69              C, "ISO C 2011",
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")
74
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")
79
80 // C++ modes
81 LANGSTANDARD(cxx98, "c++98",
82              CXX, "ISO C++ 1998 with amendments",
83              LineComment | CPlusPlus | Digraphs)
84 LANGSTANDARD_ALIAS(cxx98, "c++03")
85
86 LANGSTANDARD(gnucxx98, "gnu++98",
87              CXX, "ISO C++ 1998 with amendments and GNU extensions",
88              LineComment | CPlusPlus | Digraphs | GNUMode)
89 LANGSTANDARD_ALIAS(gnucxx98, "gnu++03")
90
91 LANGSTANDARD(cxx11, "c++11",
92              CXX, "ISO C++ 2011 with amendments",
93              LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
94 LANGSTANDARD_ALIAS_DEPR(cxx11, "c++0x")
95
96 LANGSTANDARD(gnucxx11, "gnu++11", CXX,
97              "ISO C++ 2011 with amendments and GNU extensions",
98              LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
99 LANGSTANDARD_ALIAS_DEPR(gnucxx11, "gnu++0x")
100
101 LANGSTANDARD(cxx14, "c++14",
102              CXX, "ISO C++ 2014 with amendments",
103              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
104 LANGSTANDARD_ALIAS_DEPR(cxx14, "c++1y")
105
106 LANGSTANDARD(gnucxx14, "gnu++14",
107              CXX, "ISO C++ 2014 with amendments and GNU extensions",
108              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
109              GNUMode)
110 LANGSTANDARD_ALIAS_DEPR(gnucxx14, "gnu++1y")
111
112 LANGSTANDARD(cxx17, "c++17",
113              CXX, "ISO C++ 2017 with amendments",
114              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
115              Digraphs | HexFloat)
116 LANGSTANDARD_ALIAS_DEPR(cxx17, "c++1z")
117
118 LANGSTANDARD(gnucxx17, "gnu++17",
119              CXX, "ISO C++ 2017 with amendments and GNU extensions",
120              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
121              Digraphs | HexFloat | GNUMode)
122 LANGSTANDARD_ALIAS_DEPR(gnucxx17, "gnu++1z")
123
124 LANGSTANDARD(cxx2a, "c++2a",
125              CXX, "Working draft for ISO C++ 2020",
126              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
127              CPlusPlus2a | Digraphs | HexFloat)
128
129 LANGSTANDARD(gnucxx2a, "gnu++2a",
130              CXX, "Working draft for ISO C++ 2020 with GNU extensions",
131              LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
132              CPlusPlus2a | Digraphs | HexFloat | GNUMode)
133
134 // OpenCL
135 LANGSTANDARD(opencl10, "cl1.0",
136              OpenCL, "OpenCL 1.0",
137              LineComment | C99 | Digraphs | HexFloat | OpenCL)
138 LANGSTANDARD_ALIAS_DEPR(opencl10, "cl")
139
140 LANGSTANDARD(opencl11, "cl1.1",
141              OpenCL, "OpenCL 1.1",
142              LineComment | C99 | Digraphs | HexFloat | OpenCL)
143 LANGSTANDARD(opencl12, "cl1.2",
144              OpenCL, "OpenCL 1.2",
145              LineComment | C99 | Digraphs | HexFloat | OpenCL)
146 LANGSTANDARD(opencl20, "cl2.0",
147              OpenCL, "OpenCL 2.0",
148              LineComment | C99 | Digraphs | HexFloat | OpenCL)
149
150 LANGSTANDARD_ALIAS_DEPR(opencl10, "CL")
151 LANGSTANDARD_ALIAS_DEPR(opencl11, "CL1.1")
152 LANGSTANDARD_ALIAS_DEPR(opencl12, "CL1.2")
153 LANGSTANDARD_ALIAS_DEPR(opencl20, "CL2.0")
154
155 // CUDA
156 LANGSTANDARD(cuda, "cuda", CUDA, "NVIDIA CUDA(tm)",
157              LineComment | CPlusPlus | Digraphs)
158
159 #undef LANGSTANDARD
160 #undef LANGSTANDARD_ALIAS
161 #undef LANGSTANDARD_ALIAS_DEPR