r181329 - Prevent crashes from hasCanonicalType matcher

Kim Gräsman kim.grasman at gmail.com
Tue May 7 11:38:19 PDT 2013


Hi Edwin,

I've seen this before for C++11 code combining templates with auto. We
added the same condition in this rev:
https://code.google.com/p/include-what-you-use/source/detail?r=421

Our test case should be a clean example. I haven't seen it for C++03.

- Kim

On Tuesday, May 7, 2013, Vane, Edwin wrote:

> I ran into the isNull() problem a while back. I've since forgotten the
> code fragment that triggered the problem so coming up with a test case is
> going to be tough. Anybody know a situation where a ValueDecl or Expr
> getType() would return a QualType where isNull() is true?
>
> > -----Original Message-----
> > From: metafoo at gmail.com <javascript:;> [mailto:metafoo at gmail.com<javascript:;>]
> On Behalf Of Richard
> > Smith
> > Sent: Tuesday, May 07, 2013 1:18 PM
> > To: Vane, Edwin; Douglas Gregor; Manuel Klimek
> > Cc: Dmitri Gribenko; cfe-commits cfe
> > Subject: Re: r181329 - Prevent crashes from hasCanonicalType matcher
> >
> > On Tue, May 7, 2013 at 10:04 AM, Vane, Edwin <edwin.vane at intel.com<javascript:;>>
> wrote:
> >
> >
> >       Probably a good idea. Who has to do that?
> >
> >
> > Please add a test case, then ask the code owner to approve for the
> branch (and
> > CC the release manager).
> >
> > The code owner for ASTMatchers should probably be Manuel but appears to
> > currently be Doug. The release manager is Bill Wendling.
> >
> >
> >       > -----Original Message-----
> >       > From: Dmitri Gribenko [mailto:gribozavr at gmail.com <javascript:;>
> ]
> >       > Sent: Tuesday, May 07, 2013 11:57 AM
> >       > To: Vane, Edwin
> >       > Cc: cfe-commits cfe
> >       > Subject: Re: r181329 - Prevent crashes from hasCanonicalType
> > matcher
> >       >
> >       > On Tue, May 7, 2013 at 6:53 PM, Edwin Vane
> > <edwin.vane at intel.com <javascript:;>> wrote:
> >       > > Author: revane
> >       > > Date: Tue May  7 10:53:23 2013
> >       > > New Revision: 181329
> >       > >
> >       > > URL: http://llvm.org/viewvc/llvm-project?rev=181329&view=rev
> >       > > Log:
> >       > > Prevent crashes from hasCanonicalType matcher
> >       > >
> >       > > Adding an QualType::isNull() check.
> >       >
> >       > Shall we commit this to Clang 3.3 branch, too?
> >       >
> >       > Dmitri
> >       >
> >       > --
> >       >
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> >       > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com<javascript:;>
> >*/
> >
> >       _______________________________________________
> >       cfe-commits mailing list
> >       cfe-commits at cs.uiuc.edu <javascript:;>
> >       http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
> >
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu <javascript:;>
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130507/36fb9207/attachment.html>


More information about the cfe-commits mailing list