Author: ericwf Date: Thu May 25 09:58:46 2017 New Revision: 303867 URL: http://llvm.org/viewvc/llvm-project?rev=303867&view=rev Log: [coroutines] Bump __cpp_coroutines version
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 Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp cfe/trunk/test/Lexer/cxx-features.cpp Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=303867&r1=303866&r2=303867&view=diff ============================================================================== --- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original) +++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Thu May 25 09:58:46 2017 @@ -535,7 +535,7 @@ static void InitializeCPlusPlusFeatureTe 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, Modified: cfe/trunk/test/Lexer/cxx-features.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx-features.cpp?rev=303867&r1=303866&r2=303867&view=diff ============================================================================== --- cfe/trunk/test/Lexer/cxx-features.cpp (original) +++ cfe/trunk/test/Lexer/cxx-features.cpp Thu May 25 09:58:46 2017 @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits