[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 6 15:32:28 PDT 2018


morehouse added inline comments.


================
Comment at: tools/clang-fuzzer/cxx_loop_proto.proto:93
+
+message Function {
+  required StatementSeq statements = 1;
----------------
Maybe call this `LoopFunction` to distinguish from the other protobuf.


================
Comment at: tools/clang-fuzzer/fuzzer-initialize/fuzzer_initialize.cpp:14
+/// the fuzzer with the correct command line arguments. 
 ///
 //===----------------------------------------------------------------------===//
----------------
Nit:  Try not to introduce whitespace at end of lines.  Depending on your configuration, this causes git to complain.


================
Comment at: tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.cpp:115
+
+} // namespace clang_fuzzer
----------------
Right now this file duplicates a lot of code from `proto_to_cxx.cpp`.  But assuming this file will continue to diverge from `proto_to_cxx.cpp`, I'm fine with the duplication for now.


================
Comment at: tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.h:22
+std::string LoopProtoToCxx(const uint8_t *data, size_t size);
+}
----------------
Instead of making a whole new header for this, can we simply add  `LoopProtoToCxx()` and `LoopFunctionToString()` to proto_to_cxx.h?  Then implement them in `loop_proto_to_cxx.cpp`?


Repository:
  rC Clang

https://reviews.llvm.org/D47843





More information about the llvm-commits mailing list