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

Petr Kudryavtsev via cfe-dev cfe-dev at lists.llvm.org
Wed Jun 7 09:50:04 PDT 2017


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



More information about the cfe-dev mailing list