<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>That's not <i>quite</i> the distinction, but it's probably close enough for your purposes.</div><div><br></div><div>In Clang, "plugin" means a shared library (DLL, .so, .dylib) that can be loaded by the compiler. The most common use of plugins is to provide additional "actions" to perform on an AST after it has been parsed; the '-plugin' flag is used to select which plugin actions to run. See <a href="http://clang.llvm.org/docs/ClangPlugins.html">http://clang.llvm.org/docs/ClangPlugins.html</a> and the PrintFunctionNames plugin in the examples/ directory.</div><div><br></div><div>A "checker" is used by the analyzer to improve knowledge about the program it's analyzing; it's a sort of visitor that can get callbacks for each expression that gets evaluated. The analyzer has a number of built-in checkers, just like the compiler has several built-in AST actions. Plugins (i.e. loaded libraries) can also add additional checkers, though support for this is a bit brittle.* The only real documentation on this is in include/clang/StaticAnalyzer/Core/CheckerRegistry.h, plus the tiny checker plugin in the examples/ directory.</div><div><br></div><div>Hope that helps clear things up a bit.</div><div>Jordan</div><div><br></div><div>* I was the one who added support for checker plugins many years ago (before joining Apple), but no one's really taken ownership in the past few years. We're pretty much just keeping the existing support limping along, no improvements.</div><div><br></div><br><div><div>On Apr 21, 2014, at 4:53 , Aitor San Juan <<a href="mailto:aitor.sj@opendeusto.es">aitor.sj@opendeusto.es</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Reading the docs through carefully, I have realized that plugins are used by the compiler, whereas checkers are used by the analyzer. Sorry for such a trivial question.<br></div><div>Cheers.<br></div><div>
<br>2014-04-19 13:43 GMT+02:00 Aitor San Juan <span dir="ltr"><<a href="mailto:aitor.sj@opendeusto.es" target="_blank">aitor.sj@opendeusto.es</a>></span>:<br><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div><div><span style="font-family:georgia,serif">Hello,<br><br></span></div><span style="font-family:georgia,serif">I was wondering the difference between the concept of a plugin and a checker. Please, correct me. As far as I know, from a technical point of view, a plugin is a separately compiled routine (DLL) that may be loaded by the compiler (compile-time). However, a checker is a routine used by Clang's analyzer to enhance the latter's analysis logic (in the case of  a checker, in order for the analyzer to be able to use it, the latter must be rebuilt).<br>

<br></span></div><span style="font-family:georgia,serif">I also wonder whether a plugin can also interact with Clang's analyzer? If so, then what reason could make you decide whether to implement a checker or a plugin?<br>

</span><div><div class="gmail_extra"><span style="font-family:georgia,serif"><br></span></div><div class="gmail_extra"><span style="font-family:georgia,serif">Thanks.<span class=""><font color="#888888"><br></font></span></span></div>
<span class=""><font color="#888888"><div class="gmail_extra"><span style="font-family:georgia,serif">Aitor.</span><br>
</div></font></span></div></div>
</blockquote></div><br></div></div></div></div>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>