aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkFloatingPoint.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-09-21 13:56:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-21 18:23:03 +0000
commit5e996b85dbfe016af4160acd70e110689b10c2d9 (patch)
tree9d3ae48d2f176789e107e5795ee8b6c987b96205 /include/private/SkFloatingPoint.h
parent1e3b79e0c6480ea7e372ec4e5a2c5e11a03a845d (diff)
no_sanitize is Clang 3.7+
Change-Id: Ifa67c3e5cc188db71fab389f20f55e7cbfc6de8d Reviewed-on: https://skia-review.googlesource.com/49747 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'include/private/SkFloatingPoint.h')
-rw-r--r--include/private/SkFloatingPoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/private/SkFloatingPoint.h b/include/private/SkFloatingPoint.h
index a131726d75..01afcd8942 100644
--- a/include/private/SkFloatingPoint.h
+++ b/include/private/SkFloatingPoint.h
@@ -108,7 +108,7 @@ static inline int sk_float_saturate2int(float x) {
// 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__)
+#if defined(__clang__) && (__clang_major__ * 1000 + __clang_minor__) >= 3007
__attribute__((no_sanitize("float-cast-overflow")))
#endif
static inline float sk_double_to_float(double x) {