diff options
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index f975c9f..d95c254 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -315,9 +315,11 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI, else if (!LangOpts.GNUMode && LangOpts.Digraphs) Builder.defineMacro("__STDC_VERSION__", "199409L"); } else { - // FIXME: Use the right value for __cplusplus for C++1y once one is chosen. - if (LangOpts.CPlusPlus1y) - Builder.defineMacro("__cplusplus", "201305L"); + // C++1y [cpp.predefined]p1: + // The name __cplusplus is defined to the value 201402L when compiling a + // C++ translation unit. + if (LangOpts.CPlusPlus1y) + Builder.defineMacro("__cplusplus", "201402L"); // C++11 [cpp.predefined]p1: // The name __cplusplus is defined to the value 201103L when compiling a // C++ translation unit. |