It's going to depend on you, the terrain and how long it takes to set up camp. If you can set up in the dark and don't need a lot of perfectly flat terrain then you can definitely keep walking until you get tired and then set up.
There have been plenty of times where I hiked into the night and then pulled just off the trail to sleep. The only times where I absolutely needed to keep hiking was when the terrain was too steep and full of switchbacks to find something.
Google Earth may be helpful as well because then you can see what the clearings will look like and where there are trees and so on before you go.
For the most part Yosemite has enough water for that not to be a problem, there will be some areas that are restricted from camping, there was an area where the bears were grabbing bear cans and chucking them off a cliff to break them open.
It's not a bad idea to have a couple of places marked in advance as potential campsites, but I wouldn't stress too much if you end up camping somewhere slightly different.