Professor Ed Peters notes an LA case in which a judge has ordered a priest to answer questions about whether a suspect confessed to him; the judge claims that the confessional privilege doesn't cover that fact.
Dr. Peters explains why there's really no material evidence to be gained from such a question anyway, and spells out what a priest may not licitly disclose.
If it serves to establish alibi or disprove it, I'm not sure if it's outside the scope. B (e.g., "Yes, he was confessing to me about noon, ergo he couldn't have been at the scene of the crime.") But the mere fact that he confessed to someone doesn't seem terribly relevant in any case, I agree.
IIRC, attorney-client priviledge does not extend to hiding the fact that someone acted as an attorney for that person. I wonder if this is where the judge is coming from?