[libc++] Extend check for non-ASCII characters to src/, test/ and benchmarks/
Differential Revision: https://reviews.llvm.org/D132180
NOKEYCHECK=True
GitOrigin-RevId: 355e0ce3c5366bd0b564a25e4b6675353da3c53e
diff --git a/src/atomic.cpp b/src/atomic.cpp
index 250d33e..ec7bb7d 100644
--- a/src/atomic.cpp
+++ b/src/atomic.cpp
@@ -52,11 +52,11 @@
#elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK)
extern "C" int __ulock_wait(uint32_t operation, void *addr, uint64_t value,
- uint32_t timeout); /* timeout is specified in microseconds */
+ uint32_t timeout); /* timeout is specified in microseconds */
extern "C" int __ulock_wake(uint32_t operation, void *addr, uint64_t wake_value);
-#define UL_COMPARE_AND_WAIT 1
-#define ULF_WAKE_ALL 0x00000100
+#define UL_COMPARE_AND_WAIT 1
+#define ULF_WAKE_ALL 0x00000100
static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
__cxx_contention_t __val)
diff --git a/src/charconv.cpp b/src/charconv.cpp
index 05ee2cb..d01ecdd 100644
--- a/src/charconv.cpp
+++ b/src/charconv.cpp
@@ -21,13 +21,13 @@
_LIBCPP_FUNC_VIS char*
__u32toa(uint32_t value, char* buffer) noexcept
{
- return __base_10_u32(buffer, value);
+ return __base_10_u32(buffer, value);
}
_LIBCPP_FUNC_VIS char*
__u64toa(uint64_t value, char* buffer) noexcept
{
- return __base_10_u64(buffer, value);
+ return __base_10_u64(buffer, value);
}
} // namespace __itoa
diff --git a/src/ios.cpp b/src/ios.cpp
index 218b27f..870406b 100644
--- a/src/ios.cpp
+++ b/src/ios.cpp
@@ -145,11 +145,11 @@
template <typename _Tp>
static size_t __ios_new_cap(size_t __req_size, size_t __current_cap)
{ // Precondition: __req_size > __current_cap
- const size_t mx = std::numeric_limits<size_t>::max() / sizeof(_Tp);
- if (__req_size < mx/2)
- return _VSTD::max(2 * __current_cap, __req_size);
- else
- return mx;
+ const size_t mx = std::numeric_limits<size_t>::max() / sizeof(_Tp);
+ if (__req_size < mx/2)
+ return _VSTD::max(2 * __current_cap, __req_size);
+ else
+ return mx;
}
int
diff --git a/src/iostream.cpp b/src/iostream.cpp
index 6164fd7..a8948ac 100644
--- a/src/iostream.cpp
+++ b/src/iostream.cpp
@@ -109,8 +109,8 @@
class DoIOSInit {
public:
- DoIOSInit();
- ~DoIOSInit();
+ DoIOSInit();
+ ~DoIOSInit();
};
DoIOSInit::DoIOSInit()
diff --git a/src/locale.cpp b/src/locale.cpp
index 6b45427..02da95c 100644
--- a/src/locale.cpp
+++ b/src/locale.cpp
@@ -4805,7 +4805,7 @@
{
// if the grouping pattern is empty _or_ there are no grouping bits, then do nothing
// we always have at least a single entry in [__g, __g_end); the end of the input sequence
- if (__grouping.size() != 0 && __g_end - __g > 1)
+ if (__grouping.size() != 0 && __g_end - __g > 1)
{
reverse(__g, __g_end);
const char* __ig = __grouping.data();
@@ -4838,7 +4838,7 @@
if ((__flags & ios_base::showpos) &&
(__flags & ios_base::basefield) != ios_base::oct &&
(__flags & ios_base::basefield) != ios_base::hex &&
- __signd)
+ __signd)
*__fmtp++ = '+';
if (__flags & ios_base::showbase)
*__fmtp++ = '#';
diff --git a/src/optional.cpp b/src/optional.cpp
index ac1a0a5..e2b5cce 100644
--- a/src/optional.cpp
+++ b/src/optional.cpp
@@ -16,7 +16,7 @@
const char* bad_optional_access::what() const noexcept {
return "bad_optional_access";
- }
+}
} // std
@@ -28,13 +28,13 @@
_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
- : public std::logic_error
+ : public std::logic_error
{
public:
- bad_optional_access() : std::logic_error("Bad optional Access") {}
+ bad_optional_access() : std::logic_error("Bad optional Access") {}
-// Get the key function ~bad_optional_access() into the dylib
- virtual ~bad_optional_access() noexcept;
+ // Get the key function ~bad_optional_access() into the dylib
+ virtual ~bad_optional_access() noexcept;
};
bad_optional_access::~bad_optional_access() noexcept = default;