From 51bacfd9c7b671da9c6bb0c3f98cb775994cffdd Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 24 Feb 2014 01:35:45 +0000 Subject: Update __cplusplus to match the value in the C++14 DIS preview (D3937). llvm-svn: 202003 --- clang/lib/Frontend/InitPreprocessor.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'clang/lib/Frontend/InitPreprocessor.cpp') diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index f975c9f6955..d95c254bbc1 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. -- cgit v1.2.3