There is so much misinformation out there on this. The ECU senses the amount of airflow and adjusts accordingly. This has been the case ever since mass airflow sensors have been used (over 30 yrs). If not, our trucks would not run right at high altitude. Granted, they lose significant power at high altitude, but they run as designed. Yes, you can gain from a tune, but you can gain from a tune w/o a CAI also.
Under federal law (see Magnuson-Moss Warranty Act), they cannot void your warranty due to the use of aftermarket parts unless they can prove it was the cause of the failure. However, from a practical standpoint, they can say they are going to void your warranty and put you in the inconvenient (and expensive) position of having to fight them over it. Only you can decide if it's worth it. If you're willing to take them to small claims court, they likely won't fight. You'll either win or they will settle. The challenge might be getting them to comply with the judgment/settlement.