Open Starwort opened 2 years ago
Simplified, minimal code example:
int do_work() { int rv; should_do_work() && (rv = some_parenthetical_work_doer() + 1); return rv; }
Style50 wants it reformatted to:
int do_work() { int rv; should_do_work() &&(rv = some_parenthetical_work_doer() + 1); // ^^^ space removed here return rv; }
This is clearly an incorrect suggestion.
EDIT: Occurs also without the brackets, as in should_do_thing() && thing_doer();
should_do_thing() && thing_doer();
diff: && ( -> &&(
&& (
&&(
My guess as to why this happens is that it believes the && operator to be acting as a reference here, despite that not making much sense
&&
Simplified, minimal code example:
Style50 wants it reformatted to:
This is clearly an incorrect suggestion.
EDIT: Occurs also without the brackets, as in
should_do_thing() && thing_doer();