[PATCH] D91245: [clang-format] Recognize c++ coroutine keywords as unary operator to avoid misleading pointer alignment

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 15 04:15:08 PST 2020


ChuanqiXu added a comment.

In D91245#2454504 <https://reviews.llvm.org/D91245#2454504>, @MyDeveloperDay wrote:

> Aside: Would you be prepared to take a look at D34225: [clang-format] Teach clang-format how to handle C++ coroutines <https://reviews.llvm.org/D34225> which is pretty much been abandoned, and see if there is anything there that might help the co_routinues support?

I think the test cases in D34225: [clang-format] Teach clang-format how to handle C++ coroutines <https://reviews.llvm.org/D34225> are rare in our codes. It is a little strange to write `co_return (43)` instead of `co_return 43`. And the grammar `for co_await (auto x : range)` is used rarely. I think both of them  are defects of clang-format while they are really rare in actual environments.


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

https://reviews.llvm.org/D91245



More information about the cfe-commits mailing list