Skip to content

Commit

Permalink
Tell PREfast about iterator bounds.
Browse files Browse the repository at this point in the history
We know that the iterator will iterate over Count() elements, so we
can tell PREfast to assume that.
  • Loading branch information
Penguinwizzard committed Dec 8, 2017
1 parent c69287d commit bb5ad88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/WasmReader/WasmBinaryReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ void WasmBinaryReader::PrintOps()
int i = 0;
while (iter.IsValid())
{
__analysis_assume(i < count);
ops[i] = iter.CurrentKey();
iter.MoveNext();
++i;
Expand Down

0 comments on commit bb5ad88

Please sign in to comment.