[clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions
Summary: https://bugs.llvm.org/show_bug.cgi?id=36294 Addressing bug related to returning after return type not being honoured for some operator types. ``` $ bin/clang-format --style="{BasedOnStyle: llvm, AlwaysBreakAfterReturnType: TopLevelDefinitions}" /tmp/foo.cpp class Foo { public: bool operator!() const; bool operator<(Foo const &) const; bool operator*() const; bool operator->() const; bool operator+() const; bool operator-() const; bool f() const; }; bool Foo::operator!() const { return true; } bool Foo::operator<(Foo const &) const { return true; } bool Foo::operator*() const { return true; } bool Foo::operator->() const { return true; } bool Foo::operator+() const { return true; } bool Foo::operator-() const { return true; } bool Foo::f() const { return true; } ``` Reviewers: mitchell-stellar, klimek, owenpan, sammccall, rianquinn Reviewed By: sammccall Subscribers: merge_guards_bot, cfe-commits Tags: #clang-format, #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D69573
Loading
Please register or sign in to comment