[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/3)

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 23 23:28:47 PST 2022


ChuanqiXu marked an inline comment as done.
ChuanqiXu added inline comments.


================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:192
+    "p1689-targeted-directory", llvm::cl::Optional,
+    llvm::cl::desc("Only supported for P1689, the targeted directory of which "
+                   "the dependencies are to be computed."),
----------------
ben.boeckel wrote:
> I'm not sure what this means. Is it the compiler's working directory when compiling?
In fact, the option is not used actually for P1689 now. The idea of the patch is to construct a compilation database from these 4 command line options. And the existence for the option is the placeholder and for the consistency. So you can fill the value as if you (or cmake) are generating a compilation database entry for this.


================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:197
+llvm::cl::opt<std::string> P1689TargetedCommand(
+    "p1689-targeted-command", llvm::cl::Optional,
+    llvm::cl::desc("Only supported for P1689, the targeted command of which "
----------------
ben.boeckel wrote:
> Can this be something like `--` so that I don't have to figure out how to quote the thing (for the shell and whatever parsing Clang does internally)?
Yeah, it can. Both `-` and `--` are accepted. I've updated the test to disambiguate.


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

https://reviews.llvm.org/D137534



More information about the cfe-commits mailing list