This is an archive of the discontinued LLVM Phabricator instance.

[Analyzer] Fix for iterator modeling and checkers: handle negative numbers correctly
ClosedPublic

Authored by baloghadamsoftware on Feb 18 2020, 4:45 AM.

Details

Summary

Currently, using negative numbers in iterator operations (additions and subractions) results in advancements with huge positive numbers due to an error. This patch fixes it.

Diff Detail

Event Timeline

Szelethus accepted this revision.Feb 24 2020, 8:49 AM

This patch is a good testament to how well those debug functions turned out. LGTM.

clang/lib/StaticAnalyzer/Checkers/Iterator.cpp
203

Don't use auto here.

This revision is now accepted and ready to land.Feb 24 2020, 8:49 AM
This revision was automatically updated to reflect the committed changes.