Use clang-tidy to simplify conditonal return statements
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/Target/SystemZ/SystemZInstrInfo.cpp | ||
---|---|---|
510 | Can this just be on the previous line and still fit 80 columns? |
lib/Target/SystemZ/SystemZInstrInfo.cpp | ||
---|---|---|
510 | Fixed. |
Comment Actions
Some of these changes make sense to me, but a number of others don't appear to make the code more readable.
The latter are typically of the form:
if (cond1) return false; if (cond2) return false; ... if (condN) return false; return true;
In a sequence like this (which is written this way to be able to easily add/remove further conditions as appropriate, it doesn't really improve maintainability to just transform the *last* condition.
Can this just be on the previous line and still fit 80 columns?