[PATCHJ] Fix for diagnosing half pointers/arrays
rjmccall at apple.com
Mon Feb 11 17:32:43 PST 2013
On Feb 11, 2013, at 6:14 AM, Joey Gouly <joey.gouly at arm.com> wrote:
> Hi John,
>> Just check whether the lvalue expression's type isHalfType() instead
>> of trying to enumerate all the syntactic cases that can give rise to it.
> Thanks. Please find a revised patch.
> I also removed the opencl_cast_from_half diagnostic, since there isn't a
> valid case
> for "(float) expr", where expr would yield a half.
> Any more comments?
I've tweaked the message and committed this as r174928.
You seem to not be diagnosing assignments to half l-values; I've left
a diagnostic in there for this purpose. The thing to do is to return the
appropriate AssignConvertType in CheckAssignmentConstraints and
report the error in DiagnoseAssignmentResult.
More information about the cfe-commits