[clang] [clang][CodeGen][UBSan] Fixing shift-exponent generation for _BitInt (PR #80515)

John McCall via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 3 10:59:05 PST 2024


rjmccall wrote:

> One thing I'll preemptively address is I didn't know where to put the new unit testing - creating a separate file seems a little heavy handed but I see that there's a test for UBSan shift generation (`clang/test/CodeGen/ubsan-shift.c`) and one for UBSan + _BitInt (`clang/test/CodeGen/ext-int-sanitizer.cpp`). Both seem equally "valid" but neither seem to test in the same way that I'm trying to test these changes. Advice on this would be appreciated.

Either one is fine as long as you aren't having to narrow the portability of a test case in order to use `_BitInt` in it.

Patch generally LGTM.

https://github.com/llvm/llvm-project/pull/80515


More information about the cfe-commits mailing list