Lets say you use Safeguard and then Thrash. Will you become confused?
Safeguard prevents the user and its party from being affected by any status condition for five turns except those caused by special abilities, held items or self-inflicted statuses.
So no, safeguard does not protect your Pokemon against self-inflicted status. Source: http://bulbapedia.bulbagarden.net/wiki/Safeguard
No, it does not. >It does not prevent self-inflicted status such as that from Toxic Orb, or the confusion side-effect of Outrage. -Smogon
So yes, it will become confused.
Source