File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ void CheckType::checkIntegerOverflow()
183183 continue ;
184184
185185 // max value according to platform settings.
186- const MathLib::bigint maxvalue = (((MathLib::bigint )1 ) << (bits - 1 )) - 1 ;
186+ const MathLib::bigint maxvalue = (((MathLib::biguint )1 ) << (bits - 1 )) - 1 ;
187187
188188 // is there a overflow result value
189189 const ValueFlow::Value *value = tok->getValueGE (maxvalue + 1 , mSettings );
@@ -193,8 +193,8 @@ void CheckType::checkIntegerOverflow()
193193 continue ;
194194
195195 // For left shift, it's common practice to shift into the sign bit
196- if (tok->str () == " <<" && value->intvalue > 0 && value->intvalue < (((MathLib::bigint)1 ) << bits))
197- continue ;
196+ // if (tok->str() == "<<" && value->intvalue > 0 && value->intvalue < (((MathLib::bigint)1) << bits))
197+ // continue;
198198
199199 integerOverflowError (tok, *value);
200200 }
You can’t perform that action at this time.
0 commit comments