Merge "Consistent qualifier ordering." into main
diff --git a/libc/system_properties/include/system_properties/prop_info.h b/libc/system_properties/include/system_properties/prop_info.h
index 3ebe7c5..e2236b0 100644
--- a/libc/system_properties/include/system_properties/prop_info.h
+++ b/libc/system_properties/include/system_properties/prop_info.h
@@ -45,14 +45,14 @@
// Read only properties will not set anything but the bottom most bit of serial and the top byte.
// We borrow the 2nd from the top byte for extra flags, and use the bottom most bit of that for
// our first user, kLongFlag.
- constexpr static uint32_t kLongFlag = 1 << 16;
+ static constexpr uint32_t kLongFlag = 1 << 16;
// The error message fits in part of a union with the previous 92 char property value so there
// must be room left over after the error message for the offset to the new longer property value
// and future expansion fields if needed. Note that this value cannot ever increase. The offset
// to the new longer property value appears immediately after it, so an increase of this size will
// break compatibility.
- constexpr static size_t kLongLegacyErrorBufferSize = 56;
+ static constexpr size_t kLongLegacyErrorBufferSize = 56;
public:
atomic_uint_least32_t serial;
diff --git a/libc/system_properties/prop_info.cpp b/libc/system_properties/prop_info.cpp
index 890d1cf..c3bf177 100644
--- a/libc/system_properties/prop_info.cpp
+++ b/libc/system_properties/prop_info.cpp
@@ -30,7 +30,7 @@
#include <string.h>
-constexpr static const char kLongLegacyError[] =
+static constexpr const char kLongLegacyError[] =
"Must use __system_property_read_callback() to read";
static_assert(sizeof(kLongLegacyError) < prop_info::kLongLegacyErrorBufferSize,
"Error message for long properties read by legacy libc must fit within 56 chars");
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp
index 776643d..aa53450 100644
--- a/tests/malloc_test.cpp
+++ b/tests/malloc_test.cpp
@@ -824,7 +824,7 @@
8, 32, 128, 4096, 32768, 131072, 1024000, 10240000, 20480000, 300000000
};
- constexpr static size_t kMaxAllocs = 50;
+ static constexpr size_t kMaxAllocs = 50;
for (size_t size : sizes) {
// If some of these allocations are stuck in a thread cache, then keep
@@ -867,7 +867,7 @@
SKIP_WITH_HWASAN << "hwasan does not implement mallinfo2";
static size_t sizes[] = {8, 32, 128, 4096, 32768, 131072, 1024000, 10240000, 20480000, 300000000};
- constexpr static size_t kMaxAllocs = 50;
+ static constexpr size_t kMaxAllocs = 50;
for (size_t size : sizes) {
// If some of these allocations are stuck in a thread cache, then keep
diff --git a/tests/stdatomic_test.cpp b/tests/stdatomic_test.cpp
index 7b98df2..727af87 100644
--- a/tests/stdatomic_test.cpp
+++ b/tests/stdatomic_test.cpp
@@ -181,7 +181,7 @@
// And a rudimentary test of acquire-release memory ordering:
-constexpr static uint_least32_t BIG = 30'000'000ul; // Assumed even below.
+static constexpr uint_least32_t BIG = 30'000'000ul; // Assumed even below.
struct three_atomics {
atomic_uint_least32_t x;
diff --git a/tests/system_properties_test.cpp b/tests/system_properties_test.cpp
index aa8fef4..b1dfe0b 100644
--- a/tests/system_properties_test.cpp
+++ b/tests/system_properties_test.cpp
@@ -498,7 +498,7 @@
check_with_read_callback(name, value);
}
- constexpr static const char* kExtraLongLegacyError =
+ static constexpr const char* kExtraLongLegacyError =
"Must use __system_property_read_callback() to read";
for (const auto& property : long_properties) {
const std::string& name = property.first;