Open dcb314 opened 3 months ago
Static analyser cppcheck says:
llvm/lib/Object/ELF.cpp:415:54: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
Source code is
const size_t FlagBits = Hdr & ELF::CREL_HDR_ADDEND ? 3 : 2;
I think
const size_t FlagBits = (Hdr & ELF::CREL_HDR_ADDEND) ? 3 : 2;
was probably intended but the code isn't clear.
I think this is low-value report. \w+ \& \w+ \? is very common and we don't want to change them.
\w+ \& \w+ \?
Some people are more fond of appeasing such linter reports but some some disagree.
Static analyser cppcheck says:
llvm/lib/Object/ELF.cpp:415:54: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
Source code is
const size_t FlagBits = Hdr & ELF::CREL_HDR_ADDEND ? 3 : 2;
I think
const size_t FlagBits = (Hdr & ELF::CREL_HDR_ADDEND) ? 3 : 2;
was probably intended but the code isn't clear.