aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-05-21 00:27:13 +0000
committerBill Wendling <isanbard@gmail.com>2013-05-21 00:27:13 +0000
commitdd7fa8c95a433b0862019791a26ed19459779c54 (patch)
tree963ff906c67afe36ac20184f5a52e0c22825e272 /lib/Frontend
parentef98ec8ac0f8d370b0a96ffdc9805adae3f152a8 (diff)
Merging r181342:
------------------------------------------------------------------------ r181342 | rsmith | 2013-05-07 12:32:56 -0700 (Tue, 07 May 2013) | 4 lines C++1y: Update __cplusplus to temporary value 201305L to allow detection of provisional C++1y support. Add __has_feature and __has_extension checks for C++1y features (based on the provisional names from the C++ features study group), and update documentation to match. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/InitPreprocessor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index 25cfac6323..dc3ab53eda 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -302,12 +302,13 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
else if (!LangOpts.GNUMode && LangOpts.Digraphs)
Builder.defineMacro("__STDC_VERSION__", "199409L");
} else {
- // FIXME: LangOpts.CPlusPlus1y
-
+ // FIXME: Use the right value for __cplusplus for C++1y once one is chosen.
+ if (LangOpts.CPlusPlus1y)
+ Builder.defineMacro("__cplusplus", "201305L");
// C++11 [cpp.predefined]p1:
// The name __cplusplus is defined to the value 201103L when compiling a
// C++ translation unit.
- if (LangOpts.CPlusPlus11)
+ else if (LangOpts.CPlusPlus11)
Builder.defineMacro("__cplusplus", "201103L");
// C++03 [cpp.predefined]p1:
// The name __cplusplus is defined to the value 199711L when compiling a