Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Init *IntRecTy::convertValue(BitsInit *BI) {
- int64_t Result = 0;
- for (unsigned i = 0, e = BI->getNumBits(); i != e; ++i)
- if (....) {
- Result |= Bit->getValue() << i;
- } else {
- return 0;
- }
- return IntInit::get(Result);
- }
- This suspicious code was found in Clang project by PVS-Studio static code analyzer.
- Warning message is:
- V629 Consider inspecting the 'Bit->getValue() << i' expression. Bit shifting of the 32-bit value with a subsequent expansion to the 64-bit type. record.cpp 248
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment