[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 14:40:44 PDT 2024


================
@@ -792,10 +792,15 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
 
   llvm::cl::PrintOptionValues();
 
+  // Expand response files in advance, so that we can "see" all the arguments
+  // when adjusting below.
+  auto ResponseExpander = expandResponseFiles(std::move(Compilations),
----------------
jansvoboda11 wrote:

"Expander" sounds like a function object that you need to invoke to expand the compilations, while the result of `expandResponseFiles()` behaves like something that's already been expanded. I don't think the fact that this has been expanded is really relevant to the rest of the code here.

```suggestion
  Compilations = expandResponseFiles(std::move(Compilations),
```

https://github.com/llvm/llvm-project/pull/89950


More information about the cfe-commits mailing list