[compiler-rt] efd02c1 - Fix accidental use of VLAs that causes these tests to fail after Clang

Richard Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 15:14:38 PDT 2020


Author: Richard Smith
Date: 2020-10-16T15:14:28-07:00
New Revision: efd02c1548ee458d59063f6393e94e972b5c3d50

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

LOG: Fix accidental use of VLAs that causes these tests to fail after Clang
commit 552c6c2328723a248c2b4d2765f75d49129dff20.

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/strncasecmp_strict.c
    compiler-rt/test/asan/TestCases/strncmp_strict.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/strncasecmp_strict.c b/compiler-rt/test/asan/TestCases/strncasecmp_strict.c
index bd937214092d..8a99783ecba9 100644
--- a/compiler-rt/test/asan/TestCases/strncasecmp_strict.c
+++ b/compiler-rt/test/asan/TestCases/strncasecmp_strict.c
@@ -24,7 +24,7 @@
 
 int main(int argc, char **argv) {
   assert(argc >= 2);
-  const size_t size = 100;
+  enum { size = 100 };
   char fill = 'o';
   char s1[size];
   char s2[size];

diff  --git a/compiler-rt/test/asan/TestCases/strncmp_strict.c b/compiler-rt/test/asan/TestCases/strncmp_strict.c
index 5b5429064ced..e06d1475b96f 100644
--- a/compiler-rt/test/asan/TestCases/strncmp_strict.c
+++ b/compiler-rt/test/asan/TestCases/strncmp_strict.c
@@ -22,7 +22,7 @@
 
 int main(int argc, char **argv) {
   assert(argc >= 2);
-  const size_t size = 100;
+  enum { size = 100 };
   char fill = 'o';
   char s1[size];
   char s2[size];


        


More information about the llvm-commits mailing list