diff --git a/src/Random.hpp b/src/Random.hpp index d1c50ad..f414157 100644 --- a/src/Random.hpp +++ b/src/Random.hpp @@ -3,6 +3,10 @@ // PCG uses unsigned shifts, and overflows a lot. Disable the sanitizer for that. #if defined(__clang__) +// If we don't ignore this diagnostic, and the sanitizer is not known yet in the clang version, this spams tens of thousands +// of warnings. Hence we disable it for a bit. +#pragma GCC diagnostic push +#pragma clang diagnostic ignored "-Wunknown-sanitizers" #pragma clang attribute push(__attribute__((no_sanitize("unsigned-shift-base", "unsigned-integer-overflow"))), \ apply_to = function) #endif @@ -11,6 +15,7 @@ #if defined(__clang__) #pragma clang attribute pop +#pragma clang diagnostic pop #endif #include