Open devcarbon-com opened 1 year ago
C example:
void GPIO_reservations(void) { /* highlighted-area */ RESERVE_GPIO(SDA, GPIO_PORT_0, GPIO_PIN_6, PID_I2C_SDA); /* highlighted-area */ RESERVE_GPIO(SCL, GPIO_PORT_0, GPIO_PIN_7, PID_I2C_SCL); RESERVE_GPIO(UART_RX, GPIO_PORT_0, GPIO_PIN_8, PID_UART2_RX); RESERVE_GPIO(UART_TX, GPIO_PORT_0, GPIO_PIN_9, PID_UART2_TX); }
call symex-shift-forward and expected result would be:
symex-shift-forward
void GPIO_reservations(void) { RESERVE_GPIO(SCL, GPIO_PORT_0, GPIO_PIN_7, PID_I2C_SCL); /* highlighted-area */ RESERVE_GPIO(SDA, GPIO_PORT_0, GPIO_PIN_6, PID_I2C_SDA); /* highlighted-area */ RESERVE_GPIO(UART_RX, GPIO_PORT_0, GPIO_PIN_8, PID_UART2_RX); RESERVE_GPIO(UART_TX, GPIO_PORT_0, GPIO_PIN_9, PID_UART2_TX); }
but actual result is:
void GPIO_reservations(void) { /* highlighted-area */ (SDA, GPIO_PORT_0, GPIO_PIN_6, PID_I2C_SDA)<cursor>RESERVE_GPIO; /* highlighted-area */ RESERVE_GPIO(SCL, GPIO_PORT_0, GPIO_PIN_7, PID_I2C_SCL); RESERVE_GPIO(UART_RX, GPIO_PORT_0, GPIO_PIN_8, PID_UART2_RX); RESERVE_GPIO(UART_TX, GPIO_PORT_0, GPIO_PIN_9, PID_UART2_TX); }
C example:
call
symex-shift-forward
and expected result would be:but actual result is: