What is it called when you build up a statement as something positive, and then make into something negative? [duplicate]

From the lyrics to Papa Was a Rollin’ Stone by The Temptations:

Papa was a rolling stone
Wherever he laid his hat was his home
And when he died all he left us was alone

What is the the name of this device?


A paraprosdokian (/pærəprɒsˈdoʊkiən/) is a figure of speech in which the latter part of a sentence, phrase, or larger discourse is surprising or unexpected in a way that causes the reader or listener to reframe or reinterpret the first part. It is frequently used for humorous or dramatic effect, sometimes producing an anticlimax. For this reason, it is extremely popular among comedians and satirists such as Groucho Marx. ...

Etymology "Paraprosdokian" comes from the Greek "παρά", meaning "against" and "προσδοκία", meaning "expectation".

Wiki

Paraprosdokian

Figure of speech in which the latter part of a sentence or phrase is surprising or unexpected; frequently used in a humorous situation.

"Where there's a will, I want to be in it," is a type of paraprosdokian.

Etymology: From παρά + προσδοκία.

definitions.net

I’ve had a perfectly wonderful evening, but this wasn’t it.
For the origin of this gem, see quoteinvestigator.com

He taught me housekeeping; when I divorce I keep the house.
"Zsa Zsa Gabor on her fifth husband, quoted by Ned Sherrin in Cutting Edge, 1984". The Guardian