[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:46:44 PST 2020
ChuanqiXu added a comment.
In D91245#2454610 <https://reviews.llvm.org/D91245#2454610>, @MyDeveloperDay wrote:
> I don't like seeing users having to use ```// clang-format off```
>
> auto try_sequence = [](int& ref) -> return_ignore {
> /* clang-format off */
> for co_await(int v : return_random_int())
> ref = v;
> /* clang-format on*/
> };
>
> it would be nice if we could land a co_routines improvement
>From the links, I find most of them are test cases of LLVM projects. But I agree with you that `/* clang-format off */` looks ugly. And I find that the grammar `for co_await ()` is missing in newer standard documentation (N4849) while it was there in N4680. Maybe it is necessary to check whether this grammar is abandoned.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91245/new/
https://reviews.llvm.org/D91245
More information about the cfe-commits
mailing list