diff options
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r-- | include/clang/Frontend/LangStandard.h | 16 | ||||
-rw-r--r-- | include/clang/Frontend/LangStandards.def | 12 |
2 files changed, 22 insertions, 6 deletions
diff --git a/include/clang/Frontend/LangStandard.h b/include/clang/Frontend/LangStandard.h index 441d34f5a3..74ca5191dd 100644 --- a/include/clang/Frontend/LangStandard.h +++ b/include/clang/Frontend/LangStandard.h @@ -19,12 +19,13 @@ namespace frontend { enum LangFeatures { BCPLComment = (1 << 0), C99 = (1 << 1), - CPlusPlus = (1 << 2), - CPlusPlus0x = (1 << 3), - Digraphs = (1 << 4), - GNUMode = (1 << 5), - HexFloat = (1 << 6), - ImplicitInt = (1 << 7) + C1X = (1 << 2), + CPlusPlus = (1 << 3), + CPlusPlus0x = (1 << 4), + Digraphs = (1 << 5), + GNUMode = (1 << 6), + HexFloat = (1 << 7), + ImplicitInt = (1 << 8) }; } @@ -56,6 +57,9 @@ public: /// isC99 - Language is a superset of C99. bool isC99() const { return Flags & frontend::C99; } + /// isC1X - Language is a superset of C1X. + bool isC1X() const { return Flags & frontend::C1X; } + /// isCPlusPlus - Language is a C++ variant. bool isCPlusPlus() const { return Flags & frontend::CPlusPlus; } diff --git a/include/clang/Frontend/LangStandards.def b/include/clang/Frontend/LangStandards.def index 06df563c6d..586e5c8fa2 100644 --- a/include/clang/Frontend/LangStandards.def +++ b/include/clang/Frontend/LangStandards.def @@ -59,6 +59,18 @@ LANGSTANDARD(gnu9x, "gnu9x", "ISO C 1999 with GNU extensions", BCPLComment | C99 | Digraphs | GNUMode | HexFloat) +// C1X modes +LANGSTANDARD(c1x, "c1x", + "ISO C 201X", + BCPLComment | C99 | C1X | Digraphs | HexFloat) +LANGSTANDARD(iso9899_201x, + "iso9899:201x", "ISO C 201X", + BCPLComment | C99 | C1X | Digraphs | HexFloat) + +LANGSTANDARD(gnu1x, "gnu1x", + "ISO C 201X with GNU extensions", + BCPLComment | C99 | C1X | Digraphs | GNUMode | HexFloat) + // C++ modes LANGSTANDARD(cxx98, "c++98", "ISO C++ 1998 with amendments", |