This article posted on our partner site Mondaq.com reviews the case in which a golf ball manufacturer raised a complaint against Costco, who in turn brought an action for a declaration of non-infringement.
The article discusses the strategic value of bringing forward such a pre-emptive claim.
A conclusion to draw is that, in an M&A context, the acquirer could require (or budget for) such a declaration as a post-closing condition or undertaking.