morehouse added inline comments.

================
Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:75
 
+// Helper function to print error message and stop the fuzzer
 void ErrorAndExit(std::string message) {
----------------
Unnecessary comment.   The naming and implementation of this function are 
intuitive.


================
Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:170
 
-  typedef void (*func)(int*, int*, int*, int);
-  func f = reinterpret_cast<func>(EE->getPointerToFunction(EntryFunc)); 
+  LLVMFunc f = (LLVMFunc) EE->getPointerToFunction(EntryFunc); 
 
----------------
Does `reinterpret_cast` work here?


================
Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:184
+  // Populate OptArrays and UnoptArrays with the arrays from InputArrays
+  memcpy(OptArrays, InputArrays, sizeof(int) * ArraySize * NumArrays);
+  memcpy(UnoptArrays, InputArrays, sizeof(int) * ArraySize * NumArrays);
----------------
The size here is reused a few times.  Let's create a variable for it.


Repository:
  rC Clang

https://reviews.llvm.org/D50194



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to