Skip to content

Commit 51e9023

Browse files
committed
valueflow.cpp: adjusted checks in valueFlowRightShift()
1 parent cbcca15 commit 51e9023

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: lib/valueflow.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -935,16 +935,16 @@ static void valueFlowRightShift(TokenList& tokenList, const Settings& settings)
935935
if (tok->str() != ">>")
936936
continue;
937937

938-
if (tok->hasKnownValue())
938+
if (tok->hasKnownIntValue())
939939
continue;
940940

941941
if (!tok->astOperand1() || !tok->astOperand2())
942942
continue;
943943

944-
if (!tok->astOperand2()->hasKnownValue())
944+
if (!tok->astOperand2()->hasKnownIntValue())
945945
continue;
946946

947-
const MathLib::bigint rhsvalue = tok->astOperand2()->getKnownValue()->intvalue;
947+
const MathLib::bigint rhsvalue = tok->astOperand2()->getKnownIntValue();
948948
if (rhsvalue < 0)
949949
continue;
950950

0 commit comments

Comments
 (0)