[libcxx-commits] [PATCH] D113977: [Coroutine] Warn deprecated 'std::experimental::coro' uses

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 16 06:43:57 PST 2021


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

LGTM with some suggestions, thanks for adding this notice!



================
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:57-59
+def DeprecatedCorotuine :
+  DiagGroup<"deprecated-coroutine">;
+def Coroutine : DiagGroup<"coroutine", [CoroutineMissingUnhandledException, DeprecatedCorotuine]>;
----------------



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11015-11017
+  "Found deprecated std::experimental::%0. Consider to update your libc++ "
+  "or move coroutine components into std namespace in case you are using "
+  "self-defined coroutine components">,
----------------
I would simply reword as "Please move from std::experimental::%0 to std::%0. Support for std::experimental::%0 will be removed in LLVM 15."

IMO the set of users defining their own coroutines header is small and it's not worth making the warning more obtuse for that corner case.


================
Comment at: libcxx/test/std/experimental/language.support/support.coroutines/lit.local.cfg:8
   config.test_format.addCompileFlags(config, '-fcoroutines-ts')
+  config.test_format.addCompileFlags(config, '-Wno-coroutine')
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113977/new/

https://reviews.llvm.org/D113977



More information about the libcxx-commits mailing list