-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] Remove outdated _LIBCPP_CLANG_VER check #71759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We always use Clang >= 16 now, so the check for Clang >= 14 is tautological. As a drive-by, clang-format the header.
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesWe always use Clang >= 16 now, so the check for Clang >= 14 is tautological. As a drive-by, clang-format the header. Full diff: https://github.com/llvm/llvm-project/pull/71759.diff 2 Files Affected:
diff --git a/libcxx/include/__atomic/atomic_init.h b/libcxx/include/__atomic/atomic_init.h
index 14310aee10c11db..c5e3e714a3a2a91 100644
--- a/libcxx/include/__atomic/atomic_init.h
+++ b/libcxx/include/__atomic/atomic_init.h
@@ -15,13 +15,13 @@
# pragma GCC system_header
#endif
-#define ATOMIC_FLAG_INIT {false}
-#define ATOMIC_VAR_INIT(__v) {__v}
+#define ATOMIC_FLAG_INIT \
+ { false }
+#define ATOMIC_VAR_INIT(__v) \
+ { __v }
#if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
-# if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1400
# pragma clang deprecated(ATOMIC_VAR_INIT)
-# endif
#endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
#endif // _LIBCPP___ATOMIC_ATOMIC_INIT_H
diff --git a/libcxx/utils/data/ignore_format.txt b/libcxx/utils/data/ignore_format.txt
index 123d06d56e29a5b..48b3c04adb54238 100644
--- a/libcxx/utils/data/ignore_format.txt
+++ b/libcxx/utils/data/ignore_format.txt
@@ -89,7 +89,6 @@ libcxx/include/array
libcxx/include/__atomic/atomic_base.h
libcxx/include/__atomic/atomic_flag.h
libcxx/include/__atomic/atomic.h
-libcxx/include/__atomic/atomic_init.h
libcxx/include/__atomic/atomic_lock_free.h
libcxx/include/__atomic/atomic_sync.h
libcxx/include/__atomic/check_memory_order.h
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I would also remove the comment after one line #if
.
We can already update _LIBCPP_CLANG_VER
in one more place to already warn about incompatibility when someone is using something unsupported.
llvm-project/libcxx/include/__config
Lines 36 to 42 in b443992
# if _LIBCPP_CLANG_VER < 1500 | |
# warning "Libc++ only supports Clang 15 and later" | |
# endif | |
# elif defined(_LIBCPP_APPLE_CLANG_VER) | |
# if _LIBCPP_APPLE_CLANG_VER < 1500 | |
# warning "Libc++ only supports AppleClang 15 and later" | |
# endif |
I'm unsure how _LIBCPP_APPLE_CLANG_VER
works, so I don't know if it can be already updated, but I guess so.
I'll do that in a separate patch, good catch though. |
We always use Clang >= 16 now, so the check for Clang >= 14 is tautological. As a drive-by, clang-format the header.
We always use Clang >= 16 now, so the check for Clang >= 14 is tautological. As a drive-by, clang-format the header.