[PATCH] D69573: [clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 30 08:24:47 PDT 2019
MyDeveloperDay marked 4 inline comments as done.
MyDeveloperDay added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2626
+ Left.Previous && Left.Previous->is(tok::kw_operator))
+ // No space between the type and the *
+ // operator void*(), operator char*(), operator Foo*().
----------------
sammccall wrote:
> why?
LLVM style and google style is different based on pointer alignment
================
Comment at: clang/unittests/Format/FormatTest.cpp:6989
verifyFormat("operator int();");
- verifyFormat("operator void *();");
+ verifyFormat("operator void*();");
verifyFormat("operator SomeType<int>();");
----------------
MyDeveloperDay wrote:
> sammccall wrote:
> > this looks like a regression at first glance, in LLVM style there's a space between type and *
> yes, I was a little concerned about this change too, it's hard to know if `operator void *` was intended as it falls off the bottom of the spacesBetween function with a return true; but if you are concerned then perhaps its better to change it back.
reverted
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69573/new/
https://reviews.llvm.org/D69573
More information about the cfe-commits
mailing list