erichkeane wrote:

> If you make it a canonical node, you also automatically don't get an `aka` in 
> diagnostics, which might be an advantage (or not).
> 
> Ie you avoid the aka in `size_t (aka 'unsigned long')` you currently get.

I don't think you'd WANT to avoid that, I would want a type-alias because what 
we want is actually something that works exactly LIKE a type alias in every 
way, except doesn't require declaration.  Optimally we'd just generate a 
`size_t` alias, but as Aaron mentioned, we cannot use that name.

YES, of course we could come up with a new type-like-thing that aliases a 
specific type (at which point, I'd say it isn't really a type, just a type 
alias with a fancy representation), but not have it be a type alias, but really 
all that does is save us a node in the AST.  IF we were worried about THAT, we 
could have it lazily constructed, though that buys us little.

https://github.com/llvm/llvm-project/pull/136542
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to