Re: Canonical param types and restrict array index qualifiers

2017-04-17 Thread Aaron Ballman via cfe-commits
On Mon, Apr 17, 2017 at 2:14 PM, Richard Smith wrote: > C11 6.7.6.3p15: "In the determination of type compatibility and of a > composite type, each parameter declared with function or array type is taken > as having the adjusted type and each parameter declared with qualified type > is taken as ha

Re: Canonical param types and restrict array index qualifiers

2017-04-17 Thread Richard Smith via cfe-commits
C11 6.7.6.3p15: "In the determination of type compatibility and of a composite type, each parameter declared with function or array type is taken as having the adjusted type and each parameter declared with qualified type is taken as having the unqualified version of its declared type." So "int f(

Canonical param types and restrict array index qualifiers

2017-04-17 Thread Aaron Ballman via cfe-commits
I've run into a case where I am calling ASTContext::getFunctionType() and getting a failed assertion because a parameter we thought we canonicalized isn't actually canonical. The function is declared as: extern int regexec (int __pmatch[__restrict]); When we call getCanonicalParamType() on that p