[PATCH] D34440: [Clang] Expand response files before loading compilation database

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 5 07:52:34 PDT 2017


alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Tooling/CommonOptionsParser.cpp:120
+  
+  // Expand response files before loading compilation database from command line
+  SmallVector<const char *, 20> newArgv(argv, argv + argc);
----------------
Add a trailing period, please.


================
Comment at: unittests/Tooling/CompilationDatabaseTest.cpp:638-652
+  ParseCompilationDatabaseFromResponseFileTest() {
+    std::error_code EC = llvm::sys::fs::createUniqueDirectory("unittest", TestDir);
+    EXPECT_TRUE(!EC);
+    llvm::sys::path::append(ResponseFileName, TestDir, "resp");
+  }
+  void setResponseFileContent(const std::string &content) {
+    std::ofstream File(ResponseFileName.c_str());
----------------
Can we do all this in the virtual file system (include/clang/Basic/VirtualFileSystem.h) to avoid creating files from the unit test?


Repository:
  rL LLVM

https://reviews.llvm.org/D34440





More information about the cfe-commits mailing list