From Ben Zimmer, this whom from J.K. Rowling’s Harry Potter and the Goblet of Fire (p. 311):
Krum, whom Harry would have thought ___ would have been used to this sort of thing, skulked, half-hidden, at the back of the group.
The position that the relative pronoun fills in this sentence — as the subject of a subordinate clause (itself functioning as the object of the verb thought) with VP would have been used to this sort of thing is marked by the underlines. In now-standard, but somewhat misleading, terminology, the pronoun is “extracted” from the subject position of an object clause, a configuration I’ve labeled ESOC (for Extracted Subject of Object Clause).
The fact that the pronoun functions as a clausal subject would predict, in most syntactic frameworks, that it should be nominative case (who). However, it immediately follows a verb, a position where an accusative pronoun is often called for; it “looks like” an object, and ESOC pronouns are often marked as accusative: whom (as in the Harry Potter sentence).




