[PATCH] [Sema] Re-land "Make FunctionType's TSI use unadjusted argument types"

Reid Kleckner rnk at google.com
Tue Jun 11 13:27:06 PDT 2013


On Tue, Jun 11, 2013 at 4:01 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> @@ -3940,6 +3940,9 @@
>                                diag::err_call_incomplete_argument, Arg))
>          return true;
>
> +      // Decay array and function types to pointers.
> +      ProtoArgType = Context.getAdjustedParameterType(ProtoArgType);
>
> You have to decay the type before the RequireCompleteType call, else
> you'll reject a call to a function like "void f(A x[2]);", where A is
> incomplete.
>

Thanks, good catch.  I don't think I can write the test case in C, but I
added one in C++.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130611/eed20d8a/attachment.html>


More information about the cfe-commits mailing list