In the final step for preserving typedef info better in the AST, upgrade
isPointerType and isVectorType to only look through a single level of typedef when one is present. For this invalid code: typedef float float4 __attribute__((vector_size(16))); typedef int int4 __attribute__((vector_size(16))); typedef int4* int4p; void test(float4 a, int4p result, int i) { result[i] = a; } we now get: t.c:5:15: error: incompatible types assigning 'float4' to 'int4' result[i] = a; ~~~~~~~~~ ^ ~ instead of: t.c:5:15: error: incompatible types assigning 'float4' to 'int __attribute__((vector_size(16)))' result[i] = a; ~~~~~~~~~ ^ ~ The rest of the type predicates should be upgraded to do the same thing. llvm-svn: 39932
Loading
Please register or sign in to comment