-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Description
Bugzilla Link | 36294 |
Resolution | FIXED |
Resolved on | Mar 30, 2020 07:35 |
Version | trunk |
OS | All |
Depends On | #44702 #44703 |
Reporter | LLVM Bugzilla Contributor |
CC | @mjacobse,@mydeveloperday |
Fixed by commit(s) | rGa75f8d98d7ac9e557b238a229a9a2647c71feed1 |
Extended Description
Tried it with the latest trunk code.
$ cat /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; }
$ 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;
}
As you can see there is no break after the return type for the operators !, * and ->