FindUBSan fails when UndefinedBehaviourSanitizer is supported on newer clang versions because FindUBSan uses check_cxx_source_compiles and the compiler may (if the user specified -Wextra) emit a warning about deleting an object with a non-virtual destructor at compile time which is caught by -Werror.
Ideally, this particular warning should be disabled so that we can get the undefined behaviour at runtime.