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

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 16 19:33:23 PST 2021


ChuanqiXu marked 5 inline comments as done.
ChuanqiXu added inline comments.


================
Comment at: clang/test/SemaCXX/co_await-range-for-exp-namespace.cpp:54
   for
-    co_await(auto i : arr) {}
+    co_await(auto i : arr) {} // expected-warning {{Found deprecated std::experimental}}
   // expected-error at -1 {{call to deleted member function 'await_transform'}}
----------------
Quuxplusone wrote:
> I'd like to see the next word in this diagnostic. (Ditto throughout. I'd also like to make sure that the diagnostic is not being printed with single-quotes in the wrong place, e.g. `Found deprecated std::experimental::'coroutine_handle'`; if it is, please fix that.)
> 
> This code is also misindented; please fix it up, as long as you're touching it. Should be
> ```
> for co_await (auto i : arr) {}
> ```
Oh, clang-format couldn't recognize the new grammar. I need to be careful to use it to format codes.


================
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')
----------------
ldionne wrote:
> 
Since the option is new added, I wonder if the CI would break if it didn't update compiler in time. (Or if it would run CI for previous compiler). Let's see if the CI would be green.


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

https://reviews.llvm.org/D113977



More information about the cfe-commits mailing list