[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 02:46:12 PST 2020


ChuanqiXu 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.
----------------
MyDeveloperDay wrote:
> HazardyKnusperkeks wrote:
> > 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.
> 
Oh, I got it. Thanks!


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

https://reviews.llvm.org/D91245



More information about the cfe-commits mailing list