with 18's you cant get a 'correct' size tyre in the 40 profile. 215/35/18 is the 'correct' size if you wanna maintain speedo and NEVER rub.
Having said that 215/40 is fine provided your wheels ar the same offset as stock. Might take the edge of your performance tho, i had 225/40/18 once and it really did take the shine of my acceleration My new tyres are 225/40/17 with no problems