This is part of the series started by D68484.
Introduce support for restrict-qualified pointers as local variables,
as member of a struct, arrays of restrict-qualified pointers,
pointers to restrict qualified pointers.
The full support is enabled with '-ffull-restrict'.
Combine it with '-fno-noalias-arguments' to avoid putting the 'noalias'
attribute on restrict pointers used as argument. This combination is
needed to correctly support restrict arguments. It is kept as a separate option,
as in some cases, the stronger noalias attribute semantics result in better code.
(which also means that some analysis passes could still be made smarter).
Note: this is a stable point and tests should run fine with the patches applied up to this point.
Note: D68519 has been incorporated.
Rather than this recursion, could you just unpack it from the CannonTy? So replace 107 with:
Type *CannonTy = getCanonicalType()->getBaseElementTypeUnsafe();
That way this is all unpacked and saves you a recursion.