It won't necessarily show up, though. I have yet to see a carfax report that shows a bodywork repair (but of course I don't know that any car I've run carfax on was in an accident). If the car was so severely damaged that it was totaled out by the insurance company, that should show up as a vehicle with a salvage title. If the car had frame damage, I think that is supposed to show up on a carfax report. There is no "damaged" identifier

Don't worry about Carfax too much - it may be your car's "permanent record" but it is far from exhaustively complete. Plus, as good of an idea as it is to check a used car's history, most people don't want to pay to check it.