[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

Bruno Cardoso Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 14:19:53 PST 2017

bruno added a comment.

Hi Alex,

Thanks for improving this.

- Instead of adding `-cc1gen-reproducer`, why can't you run that through `-cc1` and have a flag similar to `-###`, which just prints the reproducer line?
- I didn't  understand how you can use the final output information, can you give an example to illustrate?

Comment at: include/clang/Driver/Driver.h:394
+  struct CompilationDiagnosticReport {
+    std::vector<std::string> TemporaryFiles;
+  };
I assume the number of temporary files are usually small, can you switch to SmallVector here?

Comment at: tools/driver/cc1gen_reproducer_main.cpp:187
+  // Emit the information about the reproduce files to stdout.
+  int Result;
+  if (Report) {
int Result = 1; 
(no need for the else clause)

  rC Clang


More information about the cfe-commits mailing list