[compiler-rt] a997d45 - [NFC][Asan] Remove volatile from test

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 14:50:11 PDT 2025


Author: Vitaly Buka
Date: 2025-08-26T14:50:00-07:00
New Revision: a997d45af91ad7b812fce906888f2428ce05455d

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

LOG: [NFC][Asan] Remove volatile from test

After #155447.
It's not needed, but does not compile on PowerPC.

Added: 
    

Modified: 
    compiler-rt/lib/asan/tests/asan_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/tests/asan_test.cpp b/compiler-rt/lib/asan/tests/asan_test.cpp
index d351e15d1e8a2..2d23a12cc6ae2 100644
--- a/compiler-rt/lib/asan/tests/asan_test.cpp
+++ b/compiler-rt/lib/asan/tests/asan_test.cpp
@@ -395,7 +395,7 @@ TEST(AddressSanitizer, ReallocTest) {
   }
   free(ptr);
   // Realloc pointer returned by malloc(0).
-  volatile void *ptr0 = malloc(0);
+  void *ptr0 = malloc(0);
   int *ptr2 = Ident((int *)ptr0);
   ptr2 = Ident((int*)realloc(ptr2, sizeof(*ptr2)));
   *ptr2 = 42;


        


More information about the llvm-commits mailing list