<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 5, 2013, at 4:59 AM, Gábor Kozár <<a href="mailto:kozargabor@gmail.com">kozargabor@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 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>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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><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>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></div></blockquote></div><br></body></html>