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 parameter, it results in a type that is a decayed pointer that still has the restrict qualifier, because getArrayDecayedType() leaves on index type qualifiers. However, isCanonicalAsParam() checks for the presence of any local qualifiers and returns false if any are present. This results in the assertion failing. I believe this is a bug, but I'm not certain where. Should getCanonicalParamType() be stripping the restrict array index qualifier? Should isCanonicalAsParam() be modified? Or is something else going on that I'm not quite understanding? Thanks! ~Aaron _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits