I am looking for a tool, option, or regex to move trailing comments to above the line they describe. In other words I would like to turn this:
a = b; // Assign b to a
into this:
// Assign b to a
a = b;
I am currently using uncrustify to clean up a large code base, but it doesn't look like it has an option for this, nor could I find it in other tools, though I may have missed it somewhere. The code makes a lot of use of trailing comments, and for the most part they are randomly spaced and badly aligned.