You reassign it a few times in the following while loop(PollEvent), so the hit from the first construct is pretty light by comparison. You also make the code more readable by having the variable declared closer to the point is is used at.
A tiny performance loss for a much larger maintenance benefit seems like a good trade off. You can declare it above the first while loop if you prefer, their's no technical reason that requires it to be recreated every frame like in the examples.