Skip to content
Commit 2dd53352 authored by Marshall Clow's avatar Marshall Clow
Browse files

Do the math in uniform_int_distribution::operator() as unsigned to prevent UB...

Do the math in uniform_int_distribution::operator() as unsigned to prevent UB when overflowing. Also add a UBSAN notification that we're ffine with unsigned overflow. This fixes PR#32617. Thanks to Vincent & Christoph for their help with this issue.

llvm-svn: 343996
parent ff9f0258
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment