From 50d98c17b50afbef62543e86fda4231f3c32289e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C5=93ur?= Date: Sun, 18 Feb 2024 09:24:23 +0100 Subject: [PATCH] simde-detect-clang.h: add clang 17 detection (#1132) Verified with godbolt: - when using clang 17, it's 170000: https://godbolt.org/z/MTzb8va48 https://releases.llvm.org/17.0.1/tools/clang/docs/ReleaseNotes.html#attribute-changes-in-clang - when using clang 16, it's 160000: https://godbolt.org/z/8avxvq7rj https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#attribute-changes-in-clang --- simde/simde-detect-clang.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simde/simde-detect-clang.h b/simde/simde-detect-clang.h index 34975ffac..ce2c972aa 100644 --- a/simde/simde-detect-clang.h +++ b/simde/simde-detect-clang.h @@ -60,7 +60,9 @@ */ #if defined(__clang__) && !defined(SIMDE_DETECT_CLANG_VERSION) -# if __has_attribute(nouwtable) // no new warnings in 16.0 +# if __has_attribute(unsafe_buffer_usage) // no new warnings in 17.0 +# define SIMDE_DETECT_CLANG_VERSION 170000 +# elif __has_attribute(nouwtable) // no new warnings in 16.0 # define SIMDE_DETECT_CLANG_VERSION 160000 # elif __has_warning("-Warray-parameter") # define SIMDE_DETECT_CLANG_VERSION 150000