This is an archive of the discontinued LLVM Phabricator instance.

[analyzer][NFC] Tidy up handler-functions in SymbolicRangeInferrer
ClosedPublic

Authored by ASDenysPetrov on Jul 13 2022, 11:46 AM.

Details

Summary

Sorted some handler-functions into more appropriate visitor functions of the SymbolicRangeInferrer.

  • Spread getRangeForNegatedSub body over several visitor functions: VisitSymExpr, VisitSymIntExpr, VisitSymSymExpr.
  • Moved getRangeForComparisonSymbol from infer to VisitSymSymExpr.

Diff Detail

Event Timeline

ASDenysPetrov created this revision.Jul 13 2022, 11:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2022, 11:46 AM
Herald added a subscriber: rnkovacs. · View Herald Transcript
ASDenysPetrov requested review of this revision.Jul 13 2022, 11:46 AM
ASDenysPetrov retitled this revision from Tidy up handler-functions in SymbolicRangeInferrer to [analyzer][NFC] Tidy up handler-functions in SymbolicRangeInferrer.Jul 13 2022, 11:57 AM
martong accepted this revision.Jul 14 2022, 8:16 AM

Took a while to accept that this is indeed an NFC, but looks good! And indeed the code is better structured this way.

This revision is now accepted and ready to land.Jul 14 2022, 8:16 AM

Fixed a typo that caused constraint_manager_negate.c and unary-sym-expr.c tests crashes.

martong accepted this revision.Jul 15 2022, 12:35 AM

Fixed a typo that caused constraint_manager_negate.c and unary-sym-expr.c tests crashes.

Good. Still LGTM.