summaryrefslogtreecommitdiffstats
path: root/include/clang/Frontend/LangStandards.def
blob: 06fe1a3350cee23924fa0288f36b3c9180d27658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
//===-- LangStandards.def - Language Standard Data --------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef LANGSTANDARD
#error "LANGSTANDARD must be defined before including this file"
#endif

/// LANGSTANDARD(IDENT, NAME, DESC, FEATURES)
///
/// \param IDENT - The name of the standard as a C++ identifier.
/// \param NAME - The name of the standard.
/// \param DESC - A short description of the standard.
/// \param FEATURES - The standard features as flags, these are enums from the
/// clang::frontend namespace, which is assumed to be be available.

/// LANGSTANDARD_ALIAS(IDENT, ALIAS)
/// \param IDENT - The name of the standard as a C++ identifier.
/// \param ALIAS - The alias of the standard.

#ifndef LANGSTANDARD_ALIAS
#define LANGSTANDARD_ALIAS(IDENT, ALIAS)
#endif

// C89-ish modes.
LANGSTANDARD(c89, "c89",
             "ISO C 1990",
             C89 | ImplicitInt)
LANGSTANDARD(c90, "c90",
             "ISO C 1990",
             C89 | ImplicitInt)
LANGSTANDARD(iso9899_1990, "iso9899:1990",
             "ISO C 1990",
             C89 | ImplicitInt)

LANGSTANDARD(c94, "iso9899:199409",
             "ISO C 1990 with amendment 1",
             C89 | Digraphs | ImplicitInt)

LANGSTANDARD(gnu89, "gnu89",
             "ISO C 1990 with GNU extensions",
             LineComment | C89 | Digraphs | GNUMode | ImplicitInt)
LANGSTANDARD(gnu90, "gnu90",
             "ISO C 1990 with GNU extensions",
             LineComment | C89 | Digraphs | GNUMode | ImplicitInt)

// C99-ish modes
LANGSTANDARD(c99, "c99",
             "ISO C 1999",
             LineComment | C99 | Digraphs | HexFloat)
LANGSTANDARD(c9x, "c9x",
             "ISO C 1999",
             LineComment | C99 | Digraphs | HexFloat)
LANGSTANDARD(iso9899_1999,
             "iso9899:1999", "ISO C 1999",
             LineComment | C99 | Digraphs | HexFloat)
LANGSTANDARD(iso9899_199x,
             "iso9899:199x", "ISO C 1999",
             LineComment | C99 | Digraphs | HexFloat)

LANGSTANDARD(gnu99, "gnu99",
             "ISO C 1999 with GNU extensions",
             LineComment | C99 | Digraphs | GNUMode | HexFloat)
LANGSTANDARD(gnu9x, "gnu9x",
             "ISO C 1999 with GNU extensions",
             LineComment | C99 | Digraphs | GNUMode | HexFloat)

// C11 modes
LANGSTANDARD(c11, "c11",
             "ISO C 2011",
             LineComment | C99 | C11 | Digraphs | HexFloat)
LANGSTANDARD(c1x, "c1x",
             "ISO C 2011",
             LineComment | C99 | C11 | Digraphs | HexFloat)
LANGSTANDARD(iso9899_2011,
             "iso9899:2011", "ISO C 2011",
             LineComment | C99 | C11 | Digraphs | HexFloat)
LANGSTANDARD(iso9899_201x,
             "iso9899:201x", "ISO C 2011",
             LineComment | C99 | C11 | Digraphs | HexFloat)

LANGSTANDARD(gnu11, "gnu11",
             "ISO C 2011 with GNU extensions",
             LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)
LANGSTANDARD(gnu1x, "gnu1x",
             "ISO C 2011 with GNU extensions",
             LineComment | C99 | C11 | Digraphs | GNUMode | HexFloat)

// C++ modes
LANGSTANDARD(cxx98, "c++98",
             "ISO C++ 1998 with amendments",
             LineComment | CPlusPlus | Digraphs)
LANGSTANDARD(cxx03, "c++03",
             "ISO C++ 1998 with amendments",
             LineComment | CPlusPlus | Digraphs)
LANGSTANDARD(gnucxx98, "gnu++98",
             "ISO C++ 1998 with amendments and GNU extensions",
             LineComment | CPlusPlus | Digraphs | GNUMode)

LANGSTANDARD(cxx0x, "c++0x",
             "ISO C++ 2011 with amendments",
             LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
LANGSTANDARD(cxx11, "c++11",
             "ISO C++ 2011 with amendments",
             LineComment | CPlusPlus | CPlusPlus11 | Digraphs)
LANGSTANDARD(gnucxx0x, "gnu++0x",
             "ISO C++ 2011 with amendments and GNU extensions",
             LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)
LANGSTANDARD(gnucxx11, "gnu++11",
             "ISO C++ 2011 with amendments and GNU extensions",
             LineComment | CPlusPlus | CPlusPlus11 | Digraphs | GNUMode)

LANGSTANDARD(cxx1y, "c++1y",
             "ISO C++ 2014 with amendments",
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
LANGSTANDARD(cxx14, "c++14",
             "ISO C++ 2014 with amendments",
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs)
LANGSTANDARD(gnucxx1y, "gnu++1y",
             "ISO C++ 2014 with amendments and GNU extensions",
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
             GNUMode)
LANGSTANDARD(gnucxx14, "gnu++14",
             "ISO C++ 2014 with amendments and GNU extensions",
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | Digraphs |
             GNUMode)

LANGSTANDARD(cxx1z, "c++1z",
             "Working draft for ISO C++ 2017",
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
             Digraphs | HexFloat)
LANGSTANDARD(gnucxx1z, "gnu++1z",
             "Working draft for ISO C++ 2017 with GNU extensions",
             LineComment | CPlusPlus | CPlusPlus11 | CPlusPlus14 | CPlusPlus1z |
             Digraphs | HexFloat | GNUMode)

// OpenCL
LANGSTANDARD(opencl, "cl",
             "OpenCL 1.0",
             LineComment | C99 | Digraphs | HexFloat)
LANGSTANDARD(opencl11, "cl1.1",
             "OpenCL 1.1",
             LineComment | C99 | Digraphs | HexFloat)
LANGSTANDARD(opencl12, "cl1.2",
             "OpenCL 1.2",
             LineComment | C99 | Digraphs | HexFloat)
LANGSTANDARD(opencl20, "cl2.0",
             "OpenCL 2.0",
             LineComment | C99 | Digraphs | HexFloat)

LANGSTANDARD_ALIAS(opencl, "CL")
LANGSTANDARD_ALIAS(opencl11, "CL1.1")
LANGSTANDARD_ALIAS(opencl12, "CL1.2")
LANGSTANDARD_ALIAS(opencl20, "CL2.0")

// CUDA
LANGSTANDARD(cuda, "cuda",
             "NVIDIA CUDA(tm)",
             LineComment | CPlusPlus | Digraphs)

#undef LANGSTANDARD
#undef LANGSTANDARD_ALIAS