It would be an extra line of code, but I think this would be clearer (with even less chance of collision) if you just choose a random number in [0,35] and map it to [0-9][a-z].  The bit twiddling and array indexing seems like unnecessary cleverness and someone could accidentally come along and break it if they weren’t careful.<br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 31, 2018 at 8:25 PM Bob Haarman via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">inglorion added a comment.<br>
<br>
The inspiration for this is <a href="http://crbug.com/856635" rel="noreferrer" target="_blank">http://crbug.com/856635</a>, where we're seeing the same file name generated multiple times during a single run.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D50127" rel="noreferrer" target="_blank">https://reviews.llvm.org/D50127</a><br>
<br>
<br>
<br>
</blockquote></div>