Are you aware that the IDE already does something like this, except that it only checks code disabled via the preprocessor, so #if and related blocks. Make sure you have turned On:
IDE tools menu -> Options -> Text Editor -> C/C++ -> View -> Show Inactive Blocks
and try the code:
if(var1 == 0)
{
}
#ifdef INACTIVE_CODE_CURRENTLY
else
{
}
#endif