Closed cbecerescu closed 4 years ago
Appveyor is failing probably because of Windows 32-bit.
Appveyor is failing probably because of Windows 32-bit.
So the assertions fail because what we get from clang for Promoted.B (which is set to LONG_MAX) is actually INT_MAX, and my code doesn't promote the enum.
I'm not sure how to test this code when clang builds the AST for 32-bit (although from the output of the tests I see that the platform is x64).
I've changed the type from long to c_long so that the C and D types correspond (and the tests are passing now).
In the last case the EnumBaseType is inferred by looking at just the first enum value, which is of type int.
In C, sizeof(enum Enum3) is 8 and sizef(enum Enum1/Enum2) is 4. So changing the EnumBaseType to long if a value from the enum overflows int seems ok to me. I'm not sure if this could impact something else I'm not aware of.
EDIT: The unit test I've added passed locally, but now I see that the AppVeyor build test fails.