mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Fix detection of __datasizeof with Clang. (#94174)
The `__has_extension` builtin macro is the same as __has_feature when -pedantic-errors is specified, which means we don't get the right information about __datasizeof being available. Using __has_keyword (really !__is_identifier) will tell the truth even when -pedantic-errors is specified. This means we always have __datasizeof under Clang
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if __has_extension(datasizeof)
|
||||
#if __has_keyword(__datasizeof) || __has_extension(datasizeof)
|
||||
template <class _Tp>
|
||||
inline const size_t __datasizeof_v = __datasizeof(_Tp);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user