[PATCH] [Sema] Make FunctionType's TSI use unadjusted argument types

Reid Kleckner rnk at google.com
Sat Jun 8 14:05:58 PDT 2013


I don't think this approach is working very well.

The problem is that I'm trying to keep the un-decayed array types in TSI,
and these get propagated into many places they shouldn't.  My patch breaks
tests like:

void t22(void (*take_array(int array[1]))) {
  int arr[1];
  take_array(arr); // error: array initializer must be an initializer list
}

The problem is that GetFullTypeForDeclarator() returns a TypeSourceInfo, so
all I have to do is nest the un-decayed type deep inside that TSI.  Then it
becomes hard to find and adjust parameter types without doing a full
traversal.

The full traversal seems silly.  Maybe I should be changing the consumers
of the function types to handle array types instead?


On Sat, Jun 8, 2013 at 1:31 PM, Reid Kleckner <rnk at google.com> wrote:

>
>   Closed by commit rL183614 (authored by @rnk).
>
> CHANGED PRIOR TO COMMIT
>   http://llvm-reviews.chandlerc.com/D883?vs=2171&id=2321#toc
>
> http://llvm-reviews.chandlerc.com/D883
>
> COMMIT
>   http://llvm-reviews.chandlerc.com/rL183614
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130608/d8add82e/attachment.html>


More information about the cfe-commits mailing list