New part in Smogon articles - Veto Tiers. (http://www.smogon.com/dp/articles/move_restrictions
When multiple effects act on the same Pokemon to prevent the execution of a move, the game will first check one effect, then the next, and so on. This is the order that is checked. When a move is vetoed from being executed, no other checks are performed.
1.Freeze / Sleep
So the most obvious change is that it's no longer CPA, but CAP instead. Another thing is, I noticed most of us aren't sure whether to continue sleep/confusion count when a Pokemon flinches. Some say yes, some say no. But going by the Veto Tier, it shows that a sleeping Pokemon cannot be flinched in the first place. And since it says once a move is vetoed from being executed, no other checks are performed. I believe this means that confusion count stays the same, and shouldn't increase.
Just to be sure about the flinch, I tested on Shoddy with Togekiss and Blissey. Togekiss has a 60% chance of flinching with Air Slash. To make it accurate, I tested like 10 turns of sleep with flinches, but nothing happened. It was only when Blissey woke up, then flinch happened. Soooooooooooo, I dare say that there are no chances of flinching when asleep.