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

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 15 00:04:31 PST 2020


HazardyKnusperkeks added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:7759-7761
+  // The default setting for PointerAlignment is PAS_Right.
+  // But if we set PointerAlignment as PAS_Left, the formatter
+  // would mis-format the pointer alignment.
----------------
ChuanqiXu wrote:
> HazardyKnusperkeks wrote:
> > I don't think this should be in the tests, because it is not true (if your patch works).
> I'm confusing about your comment. What is not true? Do you mean if my patch works then the `co_return *a;` should be formatted as `co_return* a`?
No, I refer to the comment. You say `would mis-format`, but it wouln't because of your change, or not? Otherwise the tests would not pass.


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

https://reviews.llvm.org/D91245



More information about the cfe-commits mailing list