[PATCH] D144565: dwp check overflow
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 11:40:06 PDT 2023
dblaikie added inline comments.
================
Comment at: llvm/lib/DWP/DWP.cpp:238
+ Error Err (sectionOverflowErrorOrWarning(OldOffset, TypesOffset, "Types"));
+ if (Err) {
+ return Err;
----------------
steven.zhang wrote:
> Please remove the {} if there is only one statement in the if clause. The same rule applies in other changes.
We'd also usually roll in the initialization to the if condition, and prefer `=` init over `()` init (avoids explicit conversions - so it's easier to read without worrying about any more "interesting" conversions happening):
```
if (Error Err = sectionOverflowErrorOrWarning(...))
return Err;
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144565/new/
https://reviews.llvm.org/D144565
More information about the llvm-commits
mailing list