This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] [NFC] remove duplicated function
ClosedPublic

Authored by george.karpenkov on Nov 6 2017, 6:00 PM.

Details

Summary

Two copies of getSymLERange in RangeConstraintManager are virtually identical, which is clearly bad.
This patch uses lambdas to call one from another (assuming that we would like to avoid getting ranges from the state when necessary).

If the latter is not even the concern, it would be even easier to do the computation eagerly, and then pass RangeSet directly instead of a lambda.

Diff Detail

Repository
rC Clang

Event Timeline

NoQ accepted this revision.Dec 4 2017, 11:15 AM

Yep, looks good.

This revision is now accepted and ready to land.Dec 4 2017, 11:15 AM
This revision was automatically updated to reflect the committed changes.