<div dir="ltr">Thanks Anna, you're right, it works when passed directly to clang, but not when using -Xclang.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/5 Anna Zaks <span dir="ltr"><<a href="mailto:ganna@apple.com" target="_blank">ganna@apple.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div class="im"><div>On Jul 5, 2013, at 4:59 AM, Gábor Kozár <<a href="mailto:kozargabor@gmail.com" target="_blank">kozargabor@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div dir="ltr"><div><div>Hi,<br><br></div>To test the checkers we've developed, we would like to disable all clang warnings, except from the ones coming from our checker. We've tried the -w flag, but it also suppresses our own checker's warnings. </div>
</div></div></blockquote><div dir="auto"><br></div></div>Is there something special in your setup?</div><div>The -w flag should not/does not suppress warnings coming from the analyzer:</div><div dir="auto"><br></div><div dir="auto">
Ex: </div><div dir="auto"><span style="font-family:Menlo;font-size:11px">$clang -w --analyze ~/tmp/ex.m</span><div style="margin:0px;font-size:11px;font-family:Menlo"><b>/Users/zaks/tmp/ex.m:4:11: </b><span style="color:#d53bd3"><b>warning: </b></span><b>Division by zero</b></div>
<div style="margin:0px;font-size:11px;font-family:Menlo"><div style="margin:0px"> return 5/zero + 5/0;</div><div style="margin:0px;color:rgb(52,189,38)"><b> ~^~~~~</b></div><div style="margin:0px">1 warning generated.</div>
</div><div style="margin:0px;font-size:11px;font-family:Menlo"><b><br></b></div><blockquote type="cite"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div class="im"><div dir="ltr"><div>We're running the clang with the -Xclang -analyzer-checker="testchecker" flags.<br><br></div><div>We have some work-around ideas (putting a unique marker string in our warnings, and filter out any warnings that do not contain them), but I feel that this is something most checker developers would run into sooner-or-later, so surely, there must be a better solution.<br>
<br></div><div>So how could we disable all clang warnings, except for the ones emitted by our specific checker?<br></div><div><br></div><div>Thanks!<br><br>Gabor<br></div></div></div>_______________________________________________<br>
cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></div>
</blockquote></div><br></div></blockquote></div><br></div>