[PATCH] D150573: [Coverity] Fix unchecked return value, NFC
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 15 08:26:39 PDT 2023
pengfei added inline comments.
================
Comment at: llvm/lib/ObjectYAML/ELFEmitter.cpp:73
// Request to write 0 bytes to check we did not reach the limit.
- checkLimit(0);
+ (void)checkLimit(0);
return std::move(ReachedLimitErr);
----------------
barannikov88 wrote:
> If viewed without a context, I would say that this should either take an action on the result of `checkLimit`, or the function should not me marked `[[nodiscard]]`.
> Considering the context, and the use of Error class in particular, I'm not sure this would be the correct fix.
> I would suggest requesting a review from someone who is more familiar with this (not really my area).
>
Sure, adding @grimar to have a look.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150573/new/
https://reviews.llvm.org/D150573
More information about the llvm-commits
mailing list