summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp1
-rw-r--r--clang/test/Lexer/cxx-features.cpp4
-rw-r--r--clang/www/cxx_status.html2
3 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 11d58ed2eb7..1acfe708ee8 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -475,6 +475,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
Builder.defineMacro("__cpp_user_defined_literals", "200809");
Builder.defineMacro("__cpp_lambdas", "200907");
Builder.defineMacro("__cpp_constexpr",
+ LangOpts.CPlusPlus1z ? "201603" :
LangOpts.CPlusPlus14 ? "201304" : "200704");
Builder.defineMacro("__cpp_range_based_for",
LangOpts.CPlusPlus1z ? "201603" : "200907");
diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp
index 359deedbee7..d69ef08a59e 100644
--- a/clang/test/Lexer/cxx-features.cpp
+++ b/clang/test/Lexer/cxx-features.cpp
@@ -50,7 +50,7 @@
#error "wrong value for __cpp_capture_star_this"
#endif
-// FIXME: bump __cpp_constexpr to 201603 for constexpr lambda support
+// constexpr checked below
#if check(if_constexpr, 0, 0, 0, 201606) // FIXME: provisional name
#error "wrong value for __cpp_if_constexpr"
@@ -167,7 +167,7 @@
#error "wrong value for __cpp_lambdas"
#endif
-#if check(constexpr, 0, 200704, 201304, 201304)
+#if check(constexpr, 0, 200704, 201304, 201603)
#error "wrong value for __cpp_constexpr"
#endif
diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html
index 6cb87a8bc2f..736a08597d8 100644
--- a/clang/www/cxx_status.html
+++ b/clang/www/cxx_status.html
@@ -648,7 +648,7 @@ as the draft C++1z standard evolves.
<tr>
<td><tt>constexpr</tt> lambda expressions</td>
<td><a href="http://wg21.link/p0170r1">P0170R1</a></td>
- <td class="none" align="center">No</td>
+ <td class="svn" align="center">SVN</td>
</tr>
<tr>
<td>Differing <tt>begin</tt> and <tt>end</tt> types in range-based <tt>for</tt></td>
OpenPOWER on IntegriCloud