Re: [clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts
Makes total sense, thank you for the clarification. On Mon, Feb 27, 2023 at 6:24 PM chuanqi.xcq wrote: > > Hi Bruno, > > We talked about removing `-fcoroutines-ts` in > https://github.com/llvm/llvm-project/issues/59110 > and https://reviews.llvm.org/D108697. I raised the example you used here. And > the conclusion > is that this is the clang's policy for `-f*-ts` options. The same thing > happens for -fconcepts-ts and > -fmodules-ts. From my understanding, this is because we (clang) want less > dialects and we want to > focus on the form `-std=*`. > > > If my understanding now is right, `-std=c++17 -fcoroutines` should > work, right? > > `clang -std=c++17 -fcoroutines` shouldn't work. Since it is the same with > `-fcoroutines-ts`. > But if you want or you can't update to `-std=c++20` quickly, you can use > `clang -std=c++17 -Xclang -fcoroutines` for the period of transition. But the > `Xclang` options are > for developers instead of the users. So we (the users) should update > to `-std=c++20` or higher to use coroutines finally. > > Thanks, > Chuanqi > > > -- > From:Bruno Cardoso Lopes > Send Time:2023年2月28日(星期二) 06:51 > To:Chuanqi Xu ; Chuanqi Xu > Cc:cfe-commits > Subject:Re: [clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts > > > I understand that the name "coroutines-ts" isn't meaningful these > > days, but it also sounds like this commit does more than remove the > > flag, it caps useful functionality. How are users supposed to use > > c++17 with coroutines now? It's very common in our codebase and we > > have users relying on it. > > Looks like I misread your patch, sorry! If my understanding now is > right, `-std=c++17 -fcoroutines` should work, right? We should > probably add an extra test in `clang/test/Driver/coroutines.cpp` that > just test that (we currently just test when it's not). > > Cheers, > > -- > Bruno Cardoso Lopes > http://www.brunocardoso.cc > > -- Bruno Cardoso Lopes http://www.brunocardoso.cc ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts
Hi Bruno, We talked about removing `-fcoroutines-ts` in https://github.com/llvm/llvm-project/issues/59110 and https://reviews.llvm.org/D108697. I raised the example you used here. And the conclusion is that this is the clang's policy for `-f*-ts` options. The same thing happens for -fconcepts-ts and -fmodules-ts. From my understanding, this is because we (clang) want less dialects and we want to focus on the form `-std=*`. > If my understanding now is right, `-std=c++17 -fcoroutines` should work, > right? `clang -std=c++17 -fcoroutines` shouldn't work. Since it is the same with `-fcoroutines-ts`. But if you want or you can't update to `-std=c++20` quickly, you can use `clang -std=c++17 -Xclang -fcoroutines` for the period of transition. But the `Xclang` options are for developers instead of the users. So we (the users) should update to `-std=c++20` or higher to use coroutines finally. Thanks, Chuanqi -- From:Bruno Cardoso Lopes Send Time:2023年2月28日(星期二) 06:51 To:Chuanqi Xu ; Chuanqi Xu Cc:cfe-commits Subject:Re: [clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts > I understand that the name "coroutines-ts" isn't meaningful these > days, but it also sounds like this commit does more than remove the > flag, it caps useful functionality. How are users supposed to use > c++17 with coroutines now? It's very common in our codebase and we > have users relying on it. Looks like I misread your patch, sorry! If my understanding now is right, `-std=c++17 -fcoroutines` should work, right? We should probably add an extra test in `clang/test/Driver/coroutines.cpp` that just test that (we currently just test when it's not). Cheers, -- Bruno Cardoso Lopes http://www.brunocardoso.cc ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts
> I understand that the name "coroutines-ts" isn't meaningful these > days, but it also sounds like this commit does more than remove the > flag, it caps useful functionality. How are users supposed to use > c++17 with coroutines now? It's very common in our codebase and we > have users relying on it. Looks like I misread your patch, sorry! If my understanding now is right, `-std=c++17 -fcoroutines` should work, right? We should probably add an extra test in `clang/test/Driver/coroutines.cpp` that just test that (we currently just test when it's not). Cheers, -- Bruno Cardoso Lopes http://www.brunocardoso.cc ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts
Hi Chuanqi, I know the warning mentions it to be removed in clang-17, but a heads up "landing in a week" or so would have been great :) I understand that the name "coroutines-ts" isn't meaningful these days, but it also sounds like this commit does more than remove the flag, it caps useful functionality. How are users supposed to use c++17 with coroutines now? It's very common in our codebase and we have users relying on it. Thanks, On Wed, Feb 22, 2023 at 10:44 PM Chuanqi Xu via cfe-commits wrote: > > > Author: Chuanqi Xu > Date: 2023-02-23T14:40:58+08:00 > New Revision: 6ed67ccba7e4699e9e42302f2f9b7653444258ba > > URL: > https://github.com/llvm/llvm-project/commit/6ed67ccba7e4699e9e42302f2f9b7653444258ba > DIFF: > https://github.com/llvm/llvm-project/commit/6ed67ccba7e4699e9e42302f2f9b7653444258ba.diff > > LOG: [Coroutines] Remove -fcoroutines-ts > > Since we decided to remove the support for `-fcoroutines-ts` in > clang/llvm17 and the clang16/llvm16 is branched. So we're going to > remove the `-fcoroutines-ts` option. > > Added: > clang/test/Parser/cxx20-coroutines.cpp > > Modified: > clang/docs/ReleaseNotes.rst > clang/include/clang/AST/Stmt.h > clang/include/clang/Basic/DiagnosticDriverKinds.td > clang/include/clang/Basic/DiagnosticGroups.td > clang/include/clang/Basic/StmtNodes.td > clang/include/clang/Basic/TokenKinds.def > clang/include/clang/Driver/Options.td > clang/include/clang/Sema/Sema.h > clang/lib/AST/StmtPrinter.cpp > clang/lib/Driver/ToolChains/Clang.cpp > clang/lib/Sema/TreeTransform.h > clang/test/AST/Inputs/std-coroutine-exp-namespace.h > clang/test/AST/Inputs/std-coroutine.h > clang/test/CodeGen/no-skipped-passes-O0-opt-bisect.c > clang/test/CodeGenCoroutines/coro-builtins-err.c > clang/test/CodeGenCoroutines/coro-builtins.c > clang/test/CodeGenCoroutines/coro-gro2.cpp > clang/test/CodeGenCoroutines/coro-params.cpp > clang/test/CoverageMapping/coroutine.cpp > clang/test/Driver/coroutines.c > clang/test/Driver/coroutines.cpp > clang/test/Index/coroutines.cpp > clang/test/Lexer/coroutines.cpp > clang/test/Lexer/cxx-features.cpp > clang/test/Modules/requires-coroutines.mm > clang/test/PCH/coroutines.cpp > clang/test/SemaCXX/coroutine-builtins.cpp > clang/test/SemaCXX/thread-safety-coro.cpp > > Removed: > clang/test/Parser/cxx1z-coroutines.cpp > clang/test/SemaCXX/Inputs/std-coroutine-exp-namespace.h > > > > diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst > index 9c89bbc0d1786..be3ea5ff63cde 100644 > --- a/clang/docs/ReleaseNotes.rst > +++ b/clang/docs/ReleaseNotes.rst > @@ -115,6 +115,8 @@ Removed Compiler Flags > - > - The deprecated flag `-fmodules-ts` is removed. Please use ``-std=c++20`` >or higher to use standard C++ modules instead. > +- The deprecated flag `-fcoroutines-ts` is removed. Please use ``-std=c++20`` > + or higher to use standard C++ coroutines instead. > > Attribute Changes in Clang > -- > > diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h > index b70cf3aec5d6c..45010f19b69b2 100644 > --- a/clang/include/clang/AST/Stmt.h > +++ b/clang/include/clang/AST/Stmt.h > @@ -978,7 +978,7 @@ class alignas(void *) Stmt { > SourceLocation RequiresKWLoc; >}; > > - //===--- C++ Coroutines TS bitfields classes ---===// > + //===--- C++ Coroutines bitfields classes ---===// > >class CoawaitExprBitfields { > friend class CoawaitExpr; > @@ -1082,7 +1082,7 @@ class alignas(void *) Stmt { > LambdaExprBitfields LambdaExprBits; > RequiresExprBitfields RequiresExprBits; > > -// C++ Coroutines TS expressions > +// C++ Coroutines expressions > CoawaitExprBitfields CoawaitBits; > > // Obj-C Expressions > > diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td > b/clang/include/clang/Basic/DiagnosticDriverKinds.td > index 77fb1e00585a0..4c922650e100f 100644 > --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td > +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td > @@ -637,11 +637,6 @@ def warn_drv_libstdcxx_not_found : Warning< >"command line to use the libc++ standard library instead">, >InGroup>; > > -def warn_deperecated_fcoroutines_ts_flag : Warning< > - "the '-fcoroutines-ts' flag is deprecated and it will be removed in Clang > 17; " > - "use '-std=c++20' or higher to use standard C++ coroutines instead">, > - InGroup; > - > def err_drv_cannot_mix_options : Error<"cannot specify '%1' along with > '%0'">; > > def err_drv_invalid_object_mode : Error< > > diff --git a/clang/include/clang/Basic/DiagnosticGroups.td > b/clang/include/clang/Basic/DiagnosticGroups.td > index 17fdcffa2d427..d56aba34ac0a3 100644 > --- a/clang/include/clang/Basic/DiagnosticGroups.td > +++
[clang] 6ed67cc - [Coroutines] Remove -fcoroutines-ts
Author: Chuanqi Xu Date: 2023-02-23T14:40:58+08:00 New Revision: 6ed67ccba7e4699e9e42302f2f9b7653444258ba URL: https://github.com/llvm/llvm-project/commit/6ed67ccba7e4699e9e42302f2f9b7653444258ba DIFF: https://github.com/llvm/llvm-project/commit/6ed67ccba7e4699e9e42302f2f9b7653444258ba.diff LOG: [Coroutines] Remove -fcoroutines-ts Since we decided to remove the support for `-fcoroutines-ts` in clang/llvm17 and the clang16/llvm16 is branched. So we're going to remove the `-fcoroutines-ts` option. Added: clang/test/Parser/cxx20-coroutines.cpp Modified: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Stmt.h clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/StmtNodes.td clang/include/clang/Basic/TokenKinds.def clang/include/clang/Driver/Options.td clang/include/clang/Sema/Sema.h clang/lib/AST/StmtPrinter.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Sema/TreeTransform.h clang/test/AST/Inputs/std-coroutine-exp-namespace.h clang/test/AST/Inputs/std-coroutine.h clang/test/CodeGen/no-skipped-passes-O0-opt-bisect.c clang/test/CodeGenCoroutines/coro-builtins-err.c clang/test/CodeGenCoroutines/coro-builtins.c clang/test/CodeGenCoroutines/coro-gro2.cpp clang/test/CodeGenCoroutines/coro-params.cpp clang/test/CoverageMapping/coroutine.cpp clang/test/Driver/coroutines.c clang/test/Driver/coroutines.cpp clang/test/Index/coroutines.cpp clang/test/Lexer/coroutines.cpp clang/test/Lexer/cxx-features.cpp clang/test/Modules/requires-coroutines.mm clang/test/PCH/coroutines.cpp clang/test/SemaCXX/coroutine-builtins.cpp clang/test/SemaCXX/thread-safety-coro.cpp Removed: clang/test/Parser/cxx1z-coroutines.cpp clang/test/SemaCXX/Inputs/std-coroutine-exp-namespace.h diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 9c89bbc0d1786..be3ea5ff63cde 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -115,6 +115,8 @@ Removed Compiler Flags - - The deprecated flag `-fmodules-ts` is removed. Please use ``-std=c++20`` or higher to use standard C++ modules instead. +- The deprecated flag `-fcoroutines-ts` is removed. Please use ``-std=c++20`` + or higher to use standard C++ coroutines instead. Attribute Changes in Clang -- diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h index b70cf3aec5d6c..45010f19b69b2 100644 --- a/clang/include/clang/AST/Stmt.h +++ b/clang/include/clang/AST/Stmt.h @@ -978,7 +978,7 @@ class alignas(void *) Stmt { SourceLocation RequiresKWLoc; }; - //===--- C++ Coroutines TS bitfields classes ---===// + //===--- C++ Coroutines bitfields classes ---===// class CoawaitExprBitfields { friend class CoawaitExpr; @@ -1082,7 +1082,7 @@ class alignas(void *) Stmt { LambdaExprBitfields LambdaExprBits; RequiresExprBitfields RequiresExprBits; -// C++ Coroutines TS expressions +// C++ Coroutines expressions CoawaitExprBitfields CoawaitBits; // Obj-C Expressions diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index 77fb1e00585a0..4c922650e100f 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -637,11 +637,6 @@ def warn_drv_libstdcxx_not_found : Warning< "command line to use the libc++ standard library instead">, InGroup>; -def warn_deperecated_fcoroutines_ts_flag : Warning< - "the '-fcoroutines-ts' flag is deprecated and it will be removed in Clang 17; " - "use '-std=c++20' or higher to use standard C++ coroutines instead">, - InGroup; - def err_drv_cannot_mix_options : Error<"cannot specify '%1' along with '%0'">; def err_drv_invalid_object_mode : Error< diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td index 17fdcffa2d427..d56aba34ac0a3 100644 --- a/clang/include/clang/Basic/DiagnosticGroups.td +++ b/clang/include/clang/Basic/DiagnosticGroups.td @@ -60,10 +60,8 @@ def CompoundTokenSplit : DiagGroup<"compound-token-split", CompoundTokenSplitBySpace]>; def CoroutineMissingUnhandledException : DiagGroup<"coroutine-missing-unhandled-exception">; -def DeprecatedExperimentalCoroutine : - DiagGroup<"deprecated-experimental-coroutine">; def DeprecatedCoroutine : - DiagGroup<"deprecated-coroutine", [DeprecatedExperimentalCoroutine]>; + DiagGroup<"deprecated-coroutine">; def AlwaysInlineCoroutine : DiagGroup<"always-inline-coroutine">; def CoroNonAlignedAllocationFunction : diff --git a/clang/include/clang/Basic/StmtNodes.td b/clang/include/clang/Basic/StmtNodes.td index