blob: a17cd7fb27bcd14407ee9101380261d9ef726151 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
diff -ur skia.org/include/private/base/SkFloatingPoint.h skia/include/private/base/SkFloatingPoint.h
--- skia.org/include/private/base/SkFloatingPoint.h 2024-10-04 15:22:58.494566218 +0200
+++ skia/include/private/base/SkFloatingPoint.h 2024-10-04 15:23:49.102832411 +0200
@@ -132,7 +132,9 @@
// Cast double to float, ignoring any warning about too-large finite values being cast to float.
// Clang thinks this is undefined, but it's actually implementation defined to return either
// the largest float or infinity (one of the two bracketing representable floats). Good enough!
+#if defined(__clang__)
SK_NO_SANITIZE("float-cast-overflow")
+#endif
static constexpr float sk_double_to_float(double x) {
return static_cast<float>(x);
}
@@ -161,12 +163,16 @@
#pragma warning(push)
#pragma warning(disable : 4723)
#endif
+#if defined(__clang__)
SK_NO_SANITIZE("float-divide-by-zero")
+#endif
static constexpr float sk_ieee_float_divide(float numer, float denom) {
return numer / denom;
}
+#if defined(__clang__)
SK_NO_SANITIZE("float-divide-by-zero")
+#endif
static constexpr double sk_ieee_double_divide(double numer, double denom) {
return numer / denom;
}
|