[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 10 13:42:12 PDT 2018


rnk accepted this revision.
rnk added a comment.

lgtm



================
Comment at: lib/Driver/Job.cpp:319
+  if (PrintInputFilenames) {
+    for (const char *Arg : InputFilenames)
+      llvm::outs() << llvm::sys::path::filename(Arg) << "\n";
----------------
Huh, a -cc1 action can have multiple inputs? Go figure.


================
Comment at: test/Driver/cl-showfilenames.c:7-8
+// multiple: cl-showfilenames.c
+// multiple-NEXT: wildcard1.c
+// multiple-NEXT: wildcard2.c
----------------
I think it'd be nice to have the test show that diagnostics come out interleaved between the filenames. You can use `#pragma message` in the input files or something else to create warnings.


https://reviews.llvm.org/D52773





More information about the cfe-commits mailing list