Sarcasm is one of the troublesome linguistic phenomena living in a contested no man's land between semantics (the study of language-internal meaning) and pragmatics (the study of meaning in context). It's thus debated whether the sarcasm in an utterance affects its logical form, and consequently whatever truth tables it has, or whether sarcasm triggers something "extra"-logical, a process of reasoning that extends beyond the logical structure of the sentence. That's the short answer: it could go either way depending on who you believe.
For a longer answer, I'll take a detour to introduce where all this "pragmatics" stuff comes from. The classic quotation often used to introduce the subject in classes goes:
When a diplomat says yes, he means ‘perhaps’;
When he says perhaps, he means ‘no’;
When he says no, he is not a diplomat.
The idea, of course, being that sometimes people mean things that they don't literally say. Another canonical example is indirect requests: "can you pass the salt, please?". Anyone who says this is quite likely not literally asking whether you're physically capable of passing the salt; they're much more likely asking you to pass the salt, politely. For yet another example, suppose you ask me how a friend of mine is doing at their new job. I might reply, "well, they haven't gotten themselves arrested yet..." What could I possibly mean by this? I obviously intend for you to pick up on something I'm not saying: perhaps that my friend tends toward unscrupulous activities, or that the job is itself of questionable legal status, and so forth.
My last example is borrowed from H.P. Grice, probably the first dude to try and formalize pragmatics. He suggested that our linguistic exchanges are crucially cooperative and operate on the following four "maxims":
The Maxim of Quantity: give as much information as is required, and no more
The Maxim of Quality: don't say anything you believe is false, or for which you lack adequate evidence
The Maxim of Relation: be relevant in what you say (nice weather, eh?)
The Maxim of Manner: speak clearly
Pragmatics often happens when somebody "flouts" the above maxims, i.e. disobeys them obviously. A common example illustrating this is a recommendation letter consisting entirely of "this person has nice handwriting". As someone reading such a letter, I'd be perplexed by the paucity of information... until I realize the author is trying to draw my attention to the fact that they have nothing more they can truthfully say about the person - and so, the recommendation letter is actually a warning.
Getting back to sarcasm, this gives us a nice way out: someone who's being sarcastic, in the strict "saying one thing when they mean the opposite" sense, is usually flouting the Maxim of Quality; they're obviously lying. Since we know that our conversational partners are cooperative, we'd be puzzled by this, until we use some psychological acrobatics (the details are hazy, alas) to deduce that the person in fact meant the opposite of what they said, and was merely trying to be amusing/facetious/cynical/whatever. Under this account, sarcasm isn't reflected in the logical interpretation of an utterance, but rather in the post-logical "processing".
There are opposing accounts, however, which posit that something about sarcasm "triggers" our interpretation of a statement to logically negate it. In such accounts, as tale852150 says in their answer, any sarcastic sentence is logically represented as the opposite statement. The logical form of me sarcastically saying "Donald Trump is a pretty nice guy" would, by this account, be the logical form of me seriously saying "Donald Trump is not a nice guy".
tale852150's answer also points out, though, that the mere logical inversion leaves out some of the more "emotional" aspects of sarcasm, viz. their tendency to evoke humour and cynicism. For the person who advocates a semantic approach, the solution is simply to delegate the emotional work to pragmatics - this division of linguistic labour is not uncommon.
We've now more thoroughly arrived at the short answer: it could go either way depending on who you believe. For what it's worth, my studies of the contested semantics/pragmatics boundary has me mostly convinced that it's almost a disagreement of mere formalism: whatever one person explains using pragmatics, the opposing person is explaining using a functionally ~isomorphic semantic account, and there's little to adjudicate between the two. But that's just my opinion.