In literal attribution, the predicate is assigned to what the speaker considers its real bearer or performer. In figurative attribution, the predicate is assigned to something connected with that bearer, while the connection is understood contextually.
Time, place, cause, or other associations may make that shift intelligible. The speaker's understanding and the communicative setting matter.
Thus the formal structure of a sentence alone cannot mechanically prove figurative attribution in every imaginable context.