Have you run this on any open source software to see how many results/violations show up? If yes, sharing the results will be useful. If not, then its a good exercise to run it on an open source software. You can even try running it on llvm itself.<div>

<br></div><div>Arjun<br><br><div class="gmail_quote">On Fri, Oct 7, 2011 at 7:12 AM, 章磊 <span dir="ltr"><<a href="mailto:ioripolo@gmail.com">ioripolo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Clang,<br>
<br>
The attached patch adds a C++ Checker to clang, it checks whether<br>
there are mistakes in override.<br>
<br>
The mistake mean things like this:<br>
<br>
class base {<br>
  virtual void foo() const {/*...*/}<br>
};<br>
<br>
class child: public base {<br>
  /* child::foo is probably meant to override base::foo but type<br>
signatures don't match<br>
  perfectly */<br>
  void foo() {}<br>
};<br>
<br>
and this:<br>
<br>
class base {<br>
  void foo() const {}<br>
};<br>
<br>
class child: public base {<br>
  /* child::foo is probably meant to override base::foo but<br>
 that function is not virtual. */<br>
  void foo() const {}<br>
};<br>
<br>
I implement this as a static analysis checker, because i think it's<br>
not too visible and not too fast.<br>
<br>
I will appreciate it if there are any advice about this patch.<br>
<font color="#888888"><br>
--<br>
Best regards!<br>
<br>
Lei Zhang<br>
</font><br>_______________________________________________<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" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>