Lines Matching full:checker
5 <title>Checker Developer Manual</title>
19 <h1>Checker Developer Manual</h1>
24 checker, should check out the Building a Checker in 24 Hours talk
27 and refer to this page for additional information on writing a checker. The static analyzer is a
41 <li><a href="#idea">Idea for a Checker</a></li>
42 <li><a href="#registration">Checker Registration</a></li>
43 <li><a href="#events_callbacks">Events, Callbacks, and Checker Class Structure</a></li>
72 <li>Analyze a file with the specified checker:
74 $ <b>clang -cc1 -analyze -analyzer-checker=core.DivideZero test.c</b>
79 $ <b>clang -cc1 -analyzer-checker-help</b>
120 <tt>GenericDataMap</tt> which can be used to store the checker-defined part
122 notifies each checker registered to listen for that statement, giving it an
124 the checker itself should be stateless.) The checkers are called one after another
137 and the checker doesn't usually need to track any state with the concrete
211 <h2 id=idea>Idea for a Checker</h2>
213 checker idea:
219 of the issue you want to write a checker for in the existing code bases might
233 <p>Once an idea for a checker has been chosen, there are two key decisions that
236 <li> Which events the checker should be tracking. This is discussed in more
238 Checker Class Structure</a>.
239 <li> What checker-specific data needs to be stored as part of the program
246 <h2 id=registration>Checker Registration</h2>
247 All checker implementation files are located in
249 how the checker <tt>SimpleStreamChecker</tt>, which checks for misuses of
251 Similar steps should be followed for a new checker.
253 <li>A new checker implementation file, <tt>SimpleStreamChecker.cpp</tt>, was
261 <li>A package was selected for the checker and the checker was defined in the
269 def SimpleStreamChecker : Checker<"SimpleStream">,
281 After adding a new checker to the analyzer, one can verify that the new checker
283 <br> <tt><b>$clang -cc1 -analyzer-checker-help</b></tt>
285 <h2 id=events_callbacks>Events, Callbacks, and Checker Class Structure</h2>
289 Checker</a></tt> template class; the template parameter(s) describe the type of
290 events that the checker is interested in processing. The various types of events
296 defined in the checker class (<a
301 <p> As an example, consider <tt>SimpleStreamChecker</tt>. This checker needs to
325 The high-level structure of the checker's class is thus:
328 class SimpleStreamChecker : public Checker<check::PreCall,
445 <p> When a checker detects a mistake in the analyzed code, it needs a way to
480 generated by the checker can be passed to the <tt>BugReport</tt> constructor
484 If no transition has been performed during the current callback, the checker should call <a
510 Every patch should be well tested with Clang regression tests. The checker tests
520 While investigating a checker-related issue, instruct the analyzer to only
521 execute a single checker:
523 $ <b>clang -cc1 -analyze -analyzer-checker=osx.KeychainAPI test.c</b>
535 $ <b>clang -cc1 -analyze -analyzer-checker=debug.ViewCFG test.c</b>
541 $ <b>clang -cc1 -analyzer-checker-help | grep "debug"</b>
549 While debugging execute <tt>clang -cc1 -analyze -analyzer-checker=core</tt>
600 <li> The "Building a Checker in 24 hours" presentation given at the <a