Here's an idea that could probably save their sales from being completely destroyed over warranty concerns... but they'd probably have to do it BEFORE declaring bankruptcy:
1) Start a new corporation whose purpose is to offer warranty coverage for GM cars. GM would own 100% of the shares, but the company's charter would officially lay out plans for continued existence should GM itself go under and lose ownership of it.
2) The policy premiums would be paid by GM upon purchase of new cars going forward, at rates that are high enough to keep the company solvent should GM itself ever go under, but basically run it as a revenue-neutral entity (setting premiums at a level high enough to avoid losing money, but low enough to be a de-facto "nonprofit" corporation).
3) The company would have prenegotiated rates with GM dealers just like GM does for warranty claims now, and customers would be required to have warranty repairs performed by GM dealers, just like they do now. At least, as long as GM dealers continue to exist.
4) If GM went under, and GM dealers ceased to exist, the company would transform into a de-facto extended warranty insurance company, with the same terms to car owners. Going forward, the company's new owners (who acquired the shares from GM during liquidation) would be required to honor the policies in effect, but could decide to either continue it as an extended warranty insurance company, or shut it down and liquidate it once and for all once the last policy expired.
The key here is that GM puts the destiny of warranty repairs in a company that is controlled by GM (as long as they aren't liquidated), but passes legal muster as a regulated insurance company and will continue to exist for the duration of customer warranty claims, regardless of what happens to GM itself or whomever ends up owning its shares.
If GM survives, it's out a few million dollars in legal fees and the cost of setting up a new company... but regardless of what happens, it enables GM to reassure potential buyers that the warranty coverage IS good for the duration. In fact, by steering buyers to buy extended-warranty coverage from the new company as well, it could actually become a profitable entity for GM since they'd no longer be outsourcing the extended warranties to a company seeking to profit from their business.