There are two parts of the warranty that can be interpreted to void it under that situation:
"Despite the breadth of this warranty, damage resulting from
intentional actions (including intentionally abusing or destroying your vehicle or ignoring active vehicle warnings), a collision or accident (excluding from Battery fires as specified above), or the
servicing or opening of the Battery or Drive Unit
by non-Tesla personnel, is not covered under this Battery and Drive Unit Limited Warranty.
In addition, the Drive Unit is subject to the exclusions and limitations described in this New Vehicle Limited Warranty. Damage to the Battery resulting from the following activities is also not covered under this Battery and Drive Unit Limited Warranty:
• Physically damaging the Battery, or
intentionally attempting, either by physical means,
programming, or other methods, to extend (other than as specified in your owner documentation) or reduce the life of the Battery;"
https://www.tesla.com/sites/default/files/pdfs/Model_S_New_Vehicle_Limited_Warranty_201602_en_NA.pdf