Have you checked if -fwrapv is in the list of compiler arguments in the generated makefile?

There is an open issue about adding that flag when clang is used as the compiler (the flag is already used for gcc). The flag is necessary because the example code contains an integer overflow and that is undefined behavior according to the C standard.