[cfe-dev] Clang crash with attribute-types that have extra parens:

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Thu Dec 22 09:31:49 PST 2016


+cfe-dev, I must have dropped it

Richard says we shouldn't build AttributedTypes for this, even though the
comments there suggest it should be used for that. The AttributedType
modified type is redundant with the VectorType element type.

So, I think beefing up the implementation of VectorTypeLoc is the way to
go, which seems like what you were already doing.

On Wed, Dec 21, 2016 at 3:42 PM, Reid Kleckner <rnk at google.com> wrote:

> I don't think you want to go down the path of adding VisitVectorTypeLoc.
> Users can't "write" vector types directly, they can only write an
> AttributedType which desugars to a vector type and modifies the underlying
> type written in the source code. Type locations are supposed to model types
> that the user actually wrote.
>
> You want to build a TypeLoc that's similar in structure to what you'd get
> for 'int (*vs_test);', which I think is a PointerTypeLoc around a
> ParenTypeLoc around an BuiltinTypeLoc.
>
> I'm still looking at this, but that's what I think I know about this area.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161222/71821a83/attachment.html>


More information about the cfe-dev mailing list