[libc-commits] [libc] 2bfe158 - [libc] Fix wrongly deduced type

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Fri Apr 16 14:59:39 PDT 2021


Author: Guillaume Chatelet
Date: 2021-04-16T21:59:25Z
New Revision: 2bfe15810defad3e0615f79e0bda375fc8f02f23

URL: https://github.com/llvm/llvm-project/commit/2bfe15810defad3e0615f79e0bda375fc8f02f23
DIFF: https://github.com/llvm/llvm-project/commit/2bfe15810defad3e0615f79e0bda375fc8f02f23.diff

LOG: [libc] Fix wrongly deduced type

Added: 
    

Modified: 
    libc/test/src/__support/endian_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/src/__support/endian_test.cpp b/libc/test/src/__support/endian_test.cpp
index 89e2be2bf9707..e06355759e0fa 100644
--- a/libc/test/src/__support/endian_test.cpp
+++ b/libc/test/src/__support/endian_test.cpp
@@ -30,25 +30,25 @@ TEST_F(LlvmLibcEndian, Field) {
 }
 
 TEST_F(LlvmLibcEndian, uint8_t) {
-  const auto original = uint8_t(0x12);
+  const uint8_t original = uint8_t(0x12);
   check(original, original);
 }
 
 TEST_F(LlvmLibcEndian, uint16_t) {
-  const auto original = uint16_t(0x1234);
-  const auto swapped = __builtin_bswap16(original);
+  const uint16_t original = uint16_t(0x1234);
+  const uint16_t swapped = __builtin_bswap16(original);
   check(original, swapped);
 }
 
 TEST_F(LlvmLibcEndian, uint32_t) {
-  const auto original = uint32_t(0x12345678);
-  const auto swapped = __builtin_bswap32(original);
+  const uint32_t original = uint32_t(0x12345678);
+  const uint32_t swapped = __builtin_bswap32(original);
   check(original, swapped);
 }
 
 TEST_F(LlvmLibcEndian, uint64_t) {
-  const auto original = uint64_t(0x123456789ABCDEF0);
-  const auto swapped = __builtin_bswap64(original);
+  const uint64_t original = uint64_t(0x123456789ABCDEF0);
+  const uint64_t swapped = __builtin_bswap64(original);
   check(original, swapped);
 }
 


        


More information about the libc-commits mailing list