[cfe-dev] Static Analyzer Checker Options Proposal
Gabor Kozar
kozargabor at gmail.com
Mon Oct 13 07:59:54 PDT 2014
However, there will be no inheritance (i.e. the setting
'unix:Optimistic' is entirely distinct from the setting
‘unix.Malloc:Optimistic’).
I think inheritance like that could be useful in some
situations. I would expect such options to be inherited, i.e.
if I set 'unix:Optimistic', then I expect this to be visible
everywhere in the 'unix' package. Why are you proposing to
disallow this?
---
Best regards,
Gábor 'ShdNx' Kozár
[1]http://gaborkozar.me
On Sat, Oct 11, 2014, at 01:17, Anna Zaks wrote:
Background & Problem:
Clang has support for static analyzer options though
"-analyzer-config”
front-end option, which is followed by the option name and
value:
-analyzer-config <Option Name>=<Value>
This option is also available through scan-build.
Currently, there is no way to pass command line options to
specific
checkers. We work around it by creating new checker kinds (for
example,
MallocPessimistic, MallocOptimistic).
Proposed Solution:
The proposal (partially authored and implemented by Aleksei
Sidorin
[2]http://reviews.llvm.org/D3967) is to extend
"-analyzer-config" to support
checker-specific options as following:
-analyzer-config <Full Checker Name / Package Name>:<Option
Name>=<Value>
To avoid ambiguities with regular options, we should enforce
the
following:
1) <Option Name> should be an identifier
2) Checker names should be identifiers.
3) Package names should be identifiers joined with '.’.
4) <Full Checker Name> has the same form as package names.
Specifying options on a package will be allowed. However, there
will be
no inheritance (i.e. the setting 'unix:Optimistic' is entirely
distinct
from the setting ‘unix.Malloc:Optimistic’). Each checker will
be able to
query options of its package when needed. For this, we propose
changing
the getOption API to work with package and checker names as
well as
CheckerBase.
Comments and suggestions are welcome!
Anna.
_______________________________________________
cfe-dev mailing list
[3]cfe-dev at cs.uiuc.edu
[4]http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
References
1. http://gaborkozar.me/
2. http://reviews.llvm.org/D3967
3. mailto:cfe-dev at cs.uiuc.edu
4. http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141013/d02a899a/attachment.html>
More information about the cfe-dev
mailing list