andrewmw94 updated this revision to Diff 67610.
andrewmw94 added a comment.

Change the test file kmalloc-linux.c to use kfree( ).  Sorry if there was a way 
to put both patch files together; I wasn't able to find one.


Repository:
  rL LLVM

https://reviews.llvm.org/D23375

Files:
  kmalloc-linux.c

Index: kmalloc-linux.c
===================================================================
--- kmalloc-linux.c
+++ kmalloc-linux.c
@@ -6,6 +6,7 @@
 #define NULL ((void *)0)
 
 void *kmalloc(size_t, int);
+void *kfree(size_t);
 
 struct test {
 };
@@ -24,7 +25,7 @@
     t = list[i];
     foo(t);
   }
-  free(list); // no-warning
+  kfree(list); // no-warning
 }
 
 void test_nonzero() {
@@ -39,7 +40,7 @@
     t = list[i]; // expected-warning{{undefined}}
     foo(t);
   }
-  free(list);
+  kfree(list);
 }
 
 void test_indeterminate(int flags) {
@@ -54,5 +55,5 @@
     t = list[i]; // expected-warning{{undefined}}
     foo(t);
   }
-  free(list);
+  kfree(list);
 }


Index: kmalloc-linux.c
===================================================================
--- kmalloc-linux.c
+++ kmalloc-linux.c
@@ -6,6 +6,7 @@
 #define NULL ((void *)0)
 
 void *kmalloc(size_t, int);
+void *kfree(size_t);
 
 struct test {
 };
@@ -24,7 +25,7 @@
     t = list[i];
     foo(t);
   }
-  free(list); // no-warning
+  kfree(list); // no-warning
 }
 
 void test_nonzero() {
@@ -39,7 +40,7 @@
     t = list[i]; // expected-warning{{undefined}}
     foo(t);
   }
-  free(list);
+  kfree(list);
 }
 
 void test_indeterminate(int flags) {
@@ -54,5 +55,5 @@
     t = list[i]; // expected-warning{{undefined}}
     foo(t);
   }
-  free(list);
+  kfree(list);
 }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to