Remember that the so-called "salic law" was one of the Foundamental Laws of the Kingdom. It was so important that Henri III, a devout Catholic, recognised his distant cousin Henri of Navarre as his legitimate successor, even though Henri was a Protestant. He could have chosen another member of the Bourbon family, for example Henri of Navarre's oncle, the Cardinal of Bourbon (who was actually proclaimed King as "Charles X" by the Catholic League after Henri III's assassination in 1589), but felt he couldn't cheat with the law of succession.
Granted, in the treaties ending the War of Spanish Succession, Philippe V of Spain agreed to abandon any pretention on the French throne for himself and his heirs. Many jurists consider that such a renounciation is simply null and void: the crown does not belong to the King.
Louis XV, seeing himself with no male heir, would have taken steps to make sure that the crown would devolve upon the legitimate heir, in other words the eldest member of the Spanish branch of the Bourbon family.
After all, his last legitimate daughter was born when he was only 27. He would have had plenty of time to settle his succession. Philippe V of Spain was not short of male heirs. He could have sent his two eldest sons Ferdinand and Charles back to France in the early 1740s. At his death in 1746,the Spanish throne would have gone to his son Philippe, Duke of Parma, as Philippe VI.
On Louis XV's death in 1774, Charles would have been the designated successor for almost 30 years, as the Duke of Anjou (his father's title before he became King of Spain) and would have become Charles X.
I doubt very much that a piece of paper (the treaty of Utrecht) would have weighted more in Louis XV's spirit than the most foundamental law of the Capetian dynasty - the Salic law.