[cfe-dev] Mistake in BuiltinOperatorOverloadBuilder::getUsualArithmeticConversions in SemaOverload.cpp

George Burgess IV via cfe-dev cfe-dev at lists.llvm.org
Thu Jun 8 11:27:56 PDT 2017


Happy Thursday,

As it turns out, we never seem to use the result of that function; we
just shove it into a struct field and ignore it. :) r304996 was landed
to clean this up.

Thank you!
George

On Wed, Jun 7, 2017 at 9:50 AM, Petr Kudryavtsev via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> Hello,
>
> Looks like the static table for arithmetic conversions inside
> "getUsualArithmeticConversions" is out of date.
>
> It is declared as 12x12 table but is initialized as 11x11 table. It seems
> that the Float128 type is not handled in it, but it should be.
>
> For example, in method "addGenericBinaryArithmeticOverloads" we iterate over
> all promoted arithmetic types and Float128 is among them. It leads to access
> to not initialized elements of the table and also, since the Float128 type
> is 4th in method "getArithmeticType", all returned conversions for types
> with index more than or equal to 4 may be wrong.
>
> Thanks,
> Petr Kudriavtsev
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list