summaryrefslogtreecommitdiff
path: root/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-02-24 01:35:45 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-02-24 01:35:45 +0000
commitef725a70d30d805f109a55c376b78f6594862210 (patch)
treee8c4afcbe59f375a8520df8a2f7664f4db419815 /lib/Frontend/InitPreprocessor.cpp
parentbe421297e0e5e6b416a75e4230fe2b45e7876f73 (diff)
downloadclang-ef725a70d30d805f109a55c376b78f6594862210.tar.gz
clang-ef725a70d30d805f109a55c376b78f6594862210.tar.bz2
clang-ef725a70d30d805f109a55c376b78f6594862210.tar.xz
Update __cplusplus to match the value in the C++14 DIS preview (D3937).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--lib/Frontend/InitPreprocessor.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index f975c9f695..d95c254bbc 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/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.