This is an archive of the discontinued LLVM Phabricator instance.

[Static Analyzer] Moving nullability checkers to a top level package.
ClosedPublic

Authored by xazax.hun on Sep 14 2015, 10:51 AM.

Details

Summary

This patch is a preparation to enabling some of the nullability checks by default.

  1. Moved nullability checkers to a top level package. The core package is not a great fit, because some of the checks should be turned on by default and some of them should be opt-in checks.
  1. When the only the default checks turned on, tracking nullability of the symbols is not necessary. This minimizes the impact of the default checks on memory consumption.
  1. Added a separate test file to the configuration when only those checks are turned on that will be turned on by default later on.

Diff Detail

Repository
rL LLVM

Event Timeline

xazax.hun updated this revision to Diff 34703.Sep 14 2015, 10:51 AM
xazax.hun retitled this revision from to [Static Analyzer] Moving nullability checkers to a top level package..
xazax.hun updated this object.
xazax.hun added a subscriber: cfe-commits.
xazax.hun updated this revision to Diff 34705.Sep 14 2015, 10:54 AM

Removed an unintended comment formatting change.

zaks.anna accepted this revision.Sep 14 2015, 11:07 AM
zaks.anna edited edge metadata.

Please, explain in code why you are doing this. Otherwise, LGTM.

lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
139 ↗(On Diff #34705)

Explain what this is.

959 ↗(On Diff #34705)

Explain why tracking is not needed for null passed/returned checks. And the reason to disable it - optimization.

This revision is now accepted and ready to land.Sep 14 2015, 11:07 AM
This revision was automatically updated to reflect the committed changes.