HexRaysPyTools icon indicating copy to clipboard operation
HexRaysPyTools copied to clipboard

Feature request: Inversion of if statements

Open MrSapps opened this issue 5 years ago • 1 comments

Would it be possible to have something like the if/then else swapping but one that only inverts a single statement if condition?

E.g:

if (!a || !b)
{
}

Inverted to:

if (a && b)
{
}

Because a lot of times the decompiler seems to pick a bad way to represent the logic.

MrSapps avatar Jun 13 '19 19:06 MrSapps

Sure, but it probably won't be done very soon. I'm thinking about heavy refactoring and implementing something similar to llvm::PatternMatch first. That should help implementing this and other transformations and analysis.

igogo-x86 avatar Jun 20 '19 12:06 igogo-x86