With the following code: void Throw() { throw *this; } c-f currently formats it as: void Throw() { throw * this; } I looked into this and the star token is being given the type TT_BinaryOperator instead of TT_PointerOrReference, so it gets formatted with a space before and after. I'm currently working on a fix.
Created attachment 18739 [details] Proposed patch When formatting return statements like sometype func() { return *this; } the star gets the type TT_UnaryOperator. This patch makes `throw *x` behave the same way, and also adds a test to the bottom of FormatTest.UnderstandsUsesOfStarAndAmp