Use clang-tidy to simplify conditonal return statements
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Target/SystemZ/SystemZInstrInfo.cpp | ||
|---|---|---|
| 507 ↗ | (On Diff #26413) | Can this just be on the previous line and still fit 80 columns? |
| lib/Target/SystemZ/SystemZInstrInfo.cpp | ||
|---|---|---|
| 507 ↗ | (On Diff #26413) | 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.