This is an archive of the discontinued LLVM Phabricator instance.

[anayzer] Basic checker option validation
ClosedPublic

Authored by xazax.hun on Mar 5 2015, 3:36 AM.

Details

Summary

This patch adds basic validation to checker options in the static analyzer.
This validation triggers a diagnostic error in case an option is set for a nonexistent checker or package.
It is not an error to set an option for a checker that is not enabled. I think disallowing that would be too restrictive and would have negative impact on user friendliness.
Once this validation is in place, the only one left is to make sure all package and checker names are identifiers (I think that check should be done at checker registration.) and
make sure the name of the option is an identifier as well.

Diff Detail

Repository
rL LLVM

Event Timeline

xazax.hun updated this revision to Diff 21267.Mar 5 2015, 3:36 AM
xazax.hun retitled this revision from to [anayzer] Basic checker option validation.
xazax.hun updated this object.
xazax.hun edited the test plan for this revision. (Show Details)
xazax.hun added a reviewer: zaks.anna.
xazax.hun added a subscriber: Unknown Object (MLST).

Small reminder just in case this got forgotten.

xazax.hun updated this revision to Diff 28790.Jun 30 2015, 9:07 AM

Update to the latest trunk.
Minor code style improvements.

zaks.anna edited edge metadata.Jun 30 2015, 11:02 AM

Please,

Tighten the check so that we reject the prefixes of the full checker name that are not valid package names.

Also, add tests!

xazax.hun updated this revision to Diff 28917.Jul 1 2015, 4:46 PM
xazax.hun edited edge metadata.
  • Made the checker/package name validation more strict (do not accept any prefixes)
  • Added some tests
This revision was automatically updated to reflect the committed changes.