Skip to content

Commit

Permalink
[coroutines] Bump __cpp_coroutines version
Browse files Browse the repository at this point in the history
Summary: This patch is needed so that Libc++ can actually tess if Clang supports coroutines, instead of just paying lip service with a partial implementation. Otherwise the libc++ test suite will fail against older versions of Clang

Reviewers: GorNishanov, rsmith

Reviewed By: GorNishanov

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D33536

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303867 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
EricWF committed May 25, 2017
1 parent 40ed16e commit 37a1cf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Frontend/InitPreprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
if (LangOpts.ConceptsTS)
Builder.defineMacro("__cpp_experimental_concepts", "1");
if (LangOpts.CoroutinesTS)
Builder.defineMacro("__cpp_coroutines", "1");
Builder.defineMacro("__cpp_coroutines", "201703L");
}

static void InitializePredefinedMacros(const TargetInfo &TI,
Expand Down
2 changes: 1 addition & 1 deletion test/Lexer/cxx-features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,6 @@
#error "wrong value for __cpp_experimental_concepts"
#endif

#if (COROUTINES && !__cpp_coroutines) || (!COROUTINES && __cpp_coroutines)
#if defined(COROUTINES) ? check(coroutines, 201703L, 201703L, 201703L, 201703L) : check(coroutines, 0, 0, 0, 0)
#error "wrong value for __cpp_coroutines"
#endif

0 comments on commit 37a1cf7

Please sign in to comment.