This question has been asked so many times now... If dealers wanted to they could probably find out if it was remapped if they had the right equipment. Thing is, most of them don't and none that I have come across have the knowledge to find out how to detect it.
If the car is running massively more power than stock, they might suspect it's been remapped on a test drive, but in my experience most don't even notice then.
I had an S3 (old 225) mapped to 260bhp and had warranty work carried out on the engine on a couple of occasions and I mentioned that I wanted
to remap it and would they be able to tell. "There's no way we wouldn't notice it straight away" was the reply from the head of service... after they had just done work on my mapped car and not noticed
I have had the following cars mapped that were still under warranty:
Ibiza Cupra,
Audi S3,
BMW 330cd
Impreza Turbo
All have had engine warranty work done of some kind (none serious though) and none of the dealers has mentioned anything about my remaps.
Bottom line, unless you try claiming for a new car due to the engine blowing up, they not going to detect it