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

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 11:32:42 PST 2020


Quuxplusone added a comment.

Peanut gallery says: It seems to me that your root problem here is that `co_yield` is not being recognized by the parser as a keyword, and so you're seeing e.g. `co_yield* p;` the same way you'd see `CoYield* p;`.
But in that case, you should also be seeing `co_yield -1;` formatted as `co_yield - 1;` the same way you'd see `CoYield - 1;`.
Is it possible that you're not using the right (C++20) language mode? (OTOH, see D69144 <https://reviews.llvm.org/D69144>, D69180 <https://reviews.llvm.org/D69180>, which //also// didn't concern themselves with language modes. I don't understand why not.)

Could you please re-upload the diff with context (i.e. `git show -U999`)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91245



More information about the cfe-commits mailing list