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

llvm-svn: 303867
  • Loading branch information
EricWF committed May 25, 2017
1 parent 8779ea7 commit 4bf9282
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clang/lib/Frontend/InitPreprocessor.cpp
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 clang/test/Lexer/cxx-features.cpp
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 4bf9282

Please sign in to comment.