You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here the source is first and the destination is second.
Maybe this a bug that has gone unnoticed because IsFunctionConversion tends to work symmetrically? (speculating)
Or maybe there is a good reason for checkPointerTypesForAssignment to invert the parameters, but it's not commented or at all apparent by source inspection.
The text was updated successfully, but these errors were encountered:
Here the source is first and the destination is second.
Maybe this a bug that has gone unnoticed because IsFunctionConversion tends to work symmetrically? (speculating)
Or maybe there is a good reason for checkPointerTypesForAssignment to invert the parameters, but it's not commented or at all apparent by source inspection.
It’s also worth noting that, right below that, we also inconsistently pass the LHS and RHS as the FromType and ToType of other functions (comments added):
if (IsInvalidCmseNSCallConversion(S, /*FromType=*/ltrans, /*ToType=*/rtrans))
if (S.IsInvalidSMECallConversion( /*FromType=*/rtrans, /*ToType=*/ltrans))
dougsonos
pushed a commit
to dougsonos/llvm-project
that referenced
this issue
Mar 15, 2024
At the end of
Sema::checkPointerTypesForAssignment
:ltrans
andrtrans
are the left and right sides of the assignment, and are therefore the destination and source types, respectively.But:
Here the source is first and the destination is second.
Maybe this a bug that has gone unnoticed because
IsFunctionConversion
tends to work symmetrically? (speculating)Or maybe there is a good reason for
checkPointerTypesForAssignment
to invert the parameters, but it's not commented or at all apparent by source inspection.The text was updated successfully, but these errors were encountered: