[PATCH] Initial support for __sptr and __uptr

Richard Smith richard at metafoo.co.uk
Wed May 22 13:39:38 PDT 2013


On Wed, May 22, 2013 at 1:34 PM, Aaron Ballman <aaron at aaronballman.com>wrote:

> On Wed, May 22, 2013 at 3:59 PM, Richard Smith <richard at metafoo.co.uk>
> wrote:
> > +  // Pointer type qualifiers can only operate on pointer types, but not
> > +  // pointer-to-member types.
> > +  if (!Type->isPointerType() || Type->isMemberPointerType()) {
> >
> > You don't need the isMemberPointerType here.
>
> Removed.
>
> > This will still accept cases like:
> >
> > typedef int *P;
> > P __ptr32 myp;
> >
> > I would suggest checking isa<PointerType> on the type you get after
> > stripping off AttributedTypes.
>
> I had an explicit test case in to ensure that worked because I felt it
> was a reasonable use case.  Are you saying we should not allow it?


You said this was illegal in MSVC, so I don't see why we should allow it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130522/3e42b229/attachment.html>


More information about the cfe-commits mailing list