[PATCH] D150573: [Coverity] Fix unchecked return value, NFC
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 15 07:22:43 PDT 2023
barannikov88 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);
----------------
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).
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