315/35R17 is 0.02" taller than 275/40R17, a +0.08% change in diameter, inside the 3% range most shops treat as a safe swap.
Ground clearance changes by 0.01" (half the diameter change), and the tire needs 0.01" more room above it.
315/35R17 is 1.57" wider. On the same wheel offset about half of that, 0.79", moves toward the suspension and half toward the fender.
Both fit a 17" wheel; the sidewall is 0.01" taller on 315/35R17.
Details: 275/40R17 in inches · 315/35R17 in inches · change sizes in the calculator