GeneratedRegexAttribute and the code generated correspondingly when CheckForOverflowUnderflow is set to true in the .csproj file. I've created a minimal repro, but I'm unsure which github repo is the correct one to post it in: dotnet/runtime or dotnet/roslyn?