The concept of emptying the Serial Input Buffer is meaningless unless you know for sure that the sending device has stopped sending data to the Arduino BEFORE you empty the buffer and does not send any more data AFTER you have emptied the buffer.
The examples 2 and 3 in Serial Input Basics seem to work fine without any attempt to empty the buffer. The 3rd example just ignores any data between an end-marker and the next start-marker.
...R