[PATCH] Modeling APIs in the Static Analyzer
ganna at apple.com
Fri Jul 11 09:02:55 PDT 2014
> On Jul 8, 2014, at 9:40 AM, Gábor Horváth <xazax.hun at gmail.com> wrote:
> Hi there,
> I am working on a system to model API calls in the Static Analyzer. The main idea is to have C/C++ source files that contains definitions of functions and methods, and they are parsed by Clang and used by the Static Analyzer when the definition of a function or a method is in another translation unit. This can help the analyzer to find more possible issues when known APIs are modelled. (More details on my GSoC project page: http://www.google-melange.com/gsoc/project/details/google/gsoc2014/xazax/5717271485874176)
> The patch I attached can parse a model file using the ASTContext of the currently analyzed translation unit, so the model files do not need to be a standalone translation units and they can be parsed quickly. Any review on my current implementation is welcome.
> Because the error reporting is still a work in progress and the path is not truncated properly yet (the parts that are in a model file are not omitted) the test I included does not pass. I will fix it as soon as possible, but in the meanwhile any comments are welcome.
Isn’t it possible to test the patch without tweaking the error reporting? For example, modeling functions should allow you to find bugs and suppress false positives outside of those functions. I would suggest adding a few of those tests first.
Can the BugReporter change be committed separately along with the test showing how it effects both the hardcoded BodyFarm functions as well as models?
Also would be good to have high level comments describing the purpose of each file.
> Gábor Horváth
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits