1 of 2

I’ve had some success using a tool called CppCheck via a Jenkins CI system. I don’t specifically track conditional branches, but, the amount of checks this tool provides is worth the look. In particular, it lists the following code check:

“identical code in both branches of if/else or ternary operator.”

And, it’s available as a plugin for your IDE.