Index: third_party/crashpad/crashpad/util/stdlib/aligned_allocator_test.cc |
diff --git a/third_party/crashpad/crashpad/util/stdlib/aligned_allocator_test.cc b/third_party/crashpad/crashpad/util/stdlib/aligned_allocator_test.cc |
index 66ee6e6c082bdec21897fd40ac2585e9e4e6d499..2799558ef60e6b4ab429ef2e64150438901de46f 100644 |
--- a/third_party/crashpad/crashpad/util/stdlib/aligned_allocator_test.cc |
+++ b/third_party/crashpad/crashpad/util/stdlib/aligned_allocator_test.cc |
@@ -40,30 +40,30 @@ TEST(AlignedAllocator, AlignedVector) { |
AlignedVector<NaturalAlignedStruct> natural_aligned_vector; |
natural_aligned_vector.push_back(NaturalAlignedStruct()); |
EXPECT_TRUE( |
- IsAligned(&natural_aligned_vector[0], ALIGNOF(NaturalAlignedStruct))); |
+ IsAligned(&natural_aligned_vector[0], alignof(NaturalAlignedStruct))); |
natural_aligned_vector.resize(3); |
EXPECT_TRUE( |
- IsAligned(&natural_aligned_vector[0], ALIGNOF(NaturalAlignedStruct))); |
+ IsAligned(&natural_aligned_vector[0], alignof(NaturalAlignedStruct))); |
EXPECT_TRUE( |
- IsAligned(&natural_aligned_vector[1], ALIGNOF(NaturalAlignedStruct))); |
+ IsAligned(&natural_aligned_vector[1], alignof(NaturalAlignedStruct))); |
EXPECT_TRUE( |
- IsAligned(&natural_aligned_vector[2], ALIGNOF(NaturalAlignedStruct))); |
+ IsAligned(&natural_aligned_vector[2], alignof(NaturalAlignedStruct))); |
// Test a structure that declares its own alignment. |
- struct ALIGNAS(32) AlignedStruct { |
+ struct alignas(32) AlignedStruct { |
int i; |
}; |
- ASSERT_EQ(ALIGNOF(AlignedStruct), 32u); |
+ ASSERT_EQ(alignof(AlignedStruct), 32u); |
AlignedVector<AlignedStruct> aligned_vector; |
aligned_vector.push_back(AlignedStruct()); |
- EXPECT_TRUE(IsAligned(&aligned_vector[0], ALIGNOF(AlignedStruct))); |
+ EXPECT_TRUE(IsAligned(&aligned_vector[0], alignof(AlignedStruct))); |
aligned_vector.resize(3); |
- EXPECT_TRUE(IsAligned(&aligned_vector[0], ALIGNOF(AlignedStruct))); |
- EXPECT_TRUE(IsAligned(&aligned_vector[1], ALIGNOF(AlignedStruct))); |
- EXPECT_TRUE(IsAligned(&aligned_vector[2], ALIGNOF(AlignedStruct))); |
+ EXPECT_TRUE(IsAligned(&aligned_vector[0], alignof(AlignedStruct))); |
+ EXPECT_TRUE(IsAligned(&aligned_vector[1], alignof(AlignedStruct))); |
+ EXPECT_TRUE(IsAligned(&aligned_vector[2], alignof(AlignedStruct))); |
// Try a custom alignment. Since the structure itself doesn’t specify an |
// alignment constraint, only the base address will be aligned to the |
@@ -73,19 +73,19 @@ TEST(AlignedAllocator, AlignedVector) { |
EXPECT_TRUE(IsAligned(&custom_aligned_vector[0], 64)); |
// Try a structure with a pretty big alignment request. |
- struct ALIGNAS(1024) BigAlignedStruct { |
+ struct alignas(1024) BigAlignedStruct { |
int i; |
}; |
- ASSERT_EQ(ALIGNOF(BigAlignedStruct), 1024u); |
+ ASSERT_EQ(alignof(BigAlignedStruct), 1024u); |
AlignedVector<BigAlignedStruct> big_aligned_vector; |
big_aligned_vector.push_back(BigAlignedStruct()); |
- EXPECT_TRUE(IsAligned(&big_aligned_vector[0], ALIGNOF(BigAlignedStruct))); |
+ EXPECT_TRUE(IsAligned(&big_aligned_vector[0], alignof(BigAlignedStruct))); |
big_aligned_vector.resize(3); |
- EXPECT_TRUE(IsAligned(&big_aligned_vector[0], ALIGNOF(BigAlignedStruct))); |
- EXPECT_TRUE(IsAligned(&big_aligned_vector[1], ALIGNOF(BigAlignedStruct))); |
- EXPECT_TRUE(IsAligned(&big_aligned_vector[2], ALIGNOF(BigAlignedStruct))); |
+ EXPECT_TRUE(IsAligned(&big_aligned_vector[0], alignof(BigAlignedStruct))); |
+ EXPECT_TRUE(IsAligned(&big_aligned_vector[1], alignof(BigAlignedStruct))); |
+ EXPECT_TRUE(IsAligned(&big_aligned_vector[2], alignof(BigAlignedStruct))); |
} |
void BadAlignmentTest() { |