For this patch, a simple search was performed for patterns where there are two types (usually an LHS and an RHS) which are structurally the same, and there is some result type which is resolved as either one of them (typically LHS for consistency). We change those cases to resolve as the common sugared type between those two, utilizing the new infrastructure created for this purpose. Signed-off-by: Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D111509
20 lines
392 B
C
20 lines
392 B
C
// Make sure we IR-interpret the expression correctly.
|
|
|
|
typedef unsigned int uint32_t;
|
|
struct S0 {
|
|
signed f2;
|
|
};
|
|
static int g_463 = 0x1561983AL;
|
|
void func_1(void)
|
|
{
|
|
struct S0 l_19;
|
|
l_19.f2 = 419;
|
|
uint32_t l_4037 = 4294967295UL;
|
|
l_19.f2 = g_463; //%self.expect("expr ((l_4037 % (-(g_463))) | l_19.f2)", substrs=['(uint32_t) $0 = 358717883'])
|
|
}
|
|
int main()
|
|
{
|
|
func_1();
|
|
return 0;
|
|
}
|