As others have mentioned, the course of action depends on what the actual problem is.
If someone is interpersonally difficult but performs well clinically, I would proceed cautiously. You can put yourself in a tough situation by commenting on or attempting to change someone's demeanor and personality. I find that it is rarely the case that someone who is interpersonally difficult to work with doesn't have some kind of negative impact on their clinical performance because of that. However, the feedback needs to be couched in clinical terms. For example, someone who is abrasive, defensive, demanding, unable to receive feedback, etc. often struggles to work effectively with other members with the clinical team. While this may not make the resident "dangerous," per se, it's certainly warranted to provide some degree of feedback about it so that they're aware. I agree with the suggestion of providing this feedback verbally rather than bombing them with a written evaluation. If you want to get something in writing, you could consider e-mailing the program director separately.
Working with annoying residents is part of the job of an academic doc. If someone is otherwise a good clinician but I just don't get along with them, I generally approach them the same way I do with other people I feel similarly about: limit my interaction to what is needed and nothing more while trying to be as cordial as possible. I generally don't provide "annoying" residents with feedback about this unless it is clearly impacting their ability to be a psychiatrist.