morehouse added inline comments.

================
Comment at: clang/tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.cpp:124
+void SingleLoopToString(std::ostream &os, const LoopFunction &x) {
+  inner_loop = false;
+  os << "void foo(int *a, int *b, int *__restrict__ c, size_t s) {\n"
----------------
Why do we need to set `inner_loop` from different functions?

Again, using the global like this is just too easy to screw up.  I'd like to 
see it default to false and then have a scoped wrapper that sets it to true 
only for the duration necessary.


================
Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:137
+     << x.outer_statements();
+  inner_loop = true;
+  os << "%o_ct_new = add i64 %outer_ct, 1\n"
----------------
Same comment as above.  I'm getting confused trying to understand what 
`inner_loop` is set to at any given point.


Repository:
  rC Clang

https://reviews.llvm.org/D50670



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

Reply via email to