Upvote:1
If you are going to Dublin via Heathrow, you will pass through UK Immigration control at Heathrow. You will enter the UK and then continue onto Dublin. Your documents will be inspected again in Dublin.
This is because of the UK's slightly strange travel/passport arrangement with Ireland.
There's no need to stay the night in the UK (unless your visa says so).