<div dir="ltr"><div dir="ltr">Hi!<br><br>Are you using the latest 'n' greatest clang? If so, you may add options to your checker by first declaring it in Checkers.td, here's an example:<div><br></div><div><font face="courier new, monospace">def MyExample : Checker<"</font><span style="font-family:"courier new",monospace">MyChecker</span><font face="courier new, monospace">">,<br>  HelpText<"blahblah">,<br>  CheckerOptions<[<br>    CmdLineOption<Boolean,  // type of the option: String, Boolean, Integer<br>                  "Option1", // name<br>                  "example description 1", // description<br>                  "true", // default value<br>                  Released, // development stage: InAlpha, Released<br>                  Hide>, // whether it should be hidden, e.g. it's an implementation detail</font><br style="font-family:"courier new",monospace"><span style="font-family:"courier new",monospace">    CmdLineOption<Integer,</span><br style="font-family:"courier new",monospace"><span style="font-family:"courier new",monospace">                  "Option2",</span><br style="font-family:"courier new",monospace"><span style="font-family:"courier new",monospace">                  "example description 2</span><span style="font-family:"courier new",monospace">",</span><br style="font-family:"courier new",monospace"><span style="font-family:"courier new",monospace">                  5475764,</span><br style="font-family:"courier new",monospace"><span style="font-family:"courier new",monospace">                  InAlpha</span><span style="font-family:"courier new",monospace">>, // note that this option isn't hidden</span><font face="courier new, monospace"><br>  ]>,<br>  Documentation<HasDocumentation>;</font><br></div><div><font face="courier new, monospace"><br></font></div><div><font face="arial, sans-serif">Then, you may invoke the analyzer with the new options as you normally would:<br></font></div><font face="courier new, monospace"><br class="gmail-Apple-interchange-newline">clang -cc1 -analyze -analyzer-checker=MyExample -analyzer-config MyExample:Option1=false<br class="gmail-Apple-interchange-newline">clang --analyze -Xclang -analyzer-checker=MyExample -Xclang -analyzer-config -Xclang MyExample:Option1=false</font><br></div><div><br></div><div>Please follow up if you're still having trouble!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 10 Jun 2019 at 17:30, Алексеев Кирилл via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div>Hello, I'm beginner in CSA programming. I have read clang SA a checker developer manual</div><div>and have some questions.</div><div>How can I pass command line options to CSA checker? Does -Xanalyzer option can help me?</div><div>May be I need to see AnalyzerOptions.cpp, but can't understand how to catch options from my checker.</div><div class="gmail-m_5177565895442586220fac59074051ae5ed40c8811da5d24da6js-compose-signature"></div><div><br></div><div>Also I want to know  is it possible to realize multi-pass analyzer with parallel or sequential running of one or multiply checker with data transfer between passes.</div><div>I need to run first checker that taint some input, observes taint values and find some AST expressions (or with path sensible analysis).</div><div>After this checker ends up I need to start the second checker, that uses search results of 1'st in analysis from begining of ExplodedGraph.</div></blockquote><div><br></div><div>Are you sure that you need two sequential passes? As far as I know, we have nothing like that currently. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>