<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><blockquote type="cite"><div>On Jul 8, 2014, at 9:40 AM, Gábor Horváth <<a href="mailto:xazax.hun@gmail.com">xazax.hun@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div><div><div>Hi there,<br><br></div>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: <a href="http://www.google-melange.com/gsoc/project/details/google/gsoc2014/xazax/5717271485874176">http://www.google-melange.com/gsoc/project/details/google/gsoc2014/xazax/5717271485874176</a>)<br>
<br></div>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. </div></div></div></blockquote><br><blockquote type="cite"><div><div dir="ltr"><div>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.<br></div></div></div></blockquote><div><br></div>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.<br><div><br></div><div><div>Can the BugReporter change be committed separately along with the test showing how it effects both the hardcoded BodyFarm functions as well as models? </div><div><br></div></div>Also would be good to have high level comments describing the purpose of each file.</div><div><br></div><div>Anna.</div><div><br></div><div><blockquote type="cite"><div><div dir="ltr">Thanks,<br>Gábor Horváth<br><div> <br></div></div>
<span><api_modeling.patch></span>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></div></blockquote></div><br></body></html>