[cfe-dev] Check C++ Bad Override

章磊 ioripolo at gmail.com
Wed Oct 19 01:54:16 PDT 2011


Hi Arjun,

I tried this patch on llvm itself, it's too noisy.

I reviewed some of them and i think it's not the right way to implement
this.

I think i have to cancle it.

在 2011年10月8日 下午1:06,章磊 <ioripolo at gmail.com>写道:

> Hi Arjun,
>
> I have not run this patch on some open source software, but i will do
> it later. When i got any results, i will let you know asap.
>
> 2011/10/8, Arjun Singri <arjunsingri at gmail.com>:
>  > 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.
> >
> > Arjun
> >
> > On Fri, Oct 7, 2011 at 7:12 AM, 章磊 <ioripolo at gmail.com> wrote:
> >
> >> Hi Clang,
> >>
> >> The attached patch adds a C++ Checker to clang, it checks whether
> >> there are mistakes in override.
> >>
> >> The mistake mean things like this:
> >>
> >> class base {
> >>  virtual void foo() const {/*...*/}
> >> };
> >>
> >> class child: public base {
> >>  /* child::foo is probably meant to override base::foo but type
> >> signatures don't match
> >>  perfectly */
> >>  void foo() {}
> >> };
> >>
> >> and this:
> >>
> >> class base {
> >>  void foo() const {}
> >> };
> >>
> >> class child: public base {
> >>  /* child::foo is probably meant to override base::foo but
> >>  that function is not virtual. */
> >>  void foo() const {}
> >> };
> >>
> >> I implement this as a static analysis checker, because i think it's
> >> not too visible and not too fast.
> >>
> >> I will appreciate it if there are any advice about this patch.
> >>
> >> --
> >> Best regards!
> >>
> >> Lei Zhang
> >>
> >> _______________________________________________
> >> cfe-dev mailing list
> >> cfe-dev at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >>
> >>
> >
>
>
> --
> Best regards!
>
> Lei Zhang
>



-- 
Best regards!

Lei Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111019/4de806c8/attachment.html>


More information about the cfe-dev mailing list