[PATCH] D93544: [flang][driver] Refactor unit tests for frontend actions (nfc)

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 22:15:59 PST 2020


sameeranjoshi added a comment.

Thank you!
That was much needed to extract into a fixture, given a few upcoming reviews.



================
Comment at: flang/unittests/Frontend/FrontendActionTest.cpp:72-76
+    // Clear the output files. Note that these tests use an output buffer (as
+    // opposed to an output file), hence there are no physical output files to
+    // delete. Also, some actions don't generated output (e.g.
+    // ParseSyntaxOnly), but it's safe to call this anyway.
+    compInst_.ClearOutputFiles(/*EraseFiles=*/false);
----------------
Does it mean that setting `ClearOutputFiles` to `false` will always not delete the files, as you are trying to mention that it's safe to call it anyways ?
If that's true what happens when a command line option creates physical file?
So should this be left to individual `TEST_F` function?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93544/new/

https://reviews.llvm.org/D93544



More information about the llvm-commits mailing list