[PATCH] D156492: [clang][deps] Make the C++ API more type-safe

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 27 14:45:13 PDT 2023


jansvoboda11 created this revision.
jansvoboda11 added a reviewer: artemcm.
Herald added a subscriber: ributzka.
Herald added a project: All.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Scanner's C++ API accepts a set of modular dependencies the client has already seen and for which it doesn't need the full details. This is currently a set of strings, which somewhat implies that it should contain the set of module names. However, scanner internally expects the values to be in the format "{name}{hash}". Besides not being documented, this is not intuitive at all. This patch makes this expectation explicit by changing the type to set of `ModuleID`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156492

Files:
  clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
  clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
  clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
  clang/tools/clang-scan-deps/ClangScanDeps.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156492.544938.patch
Type: text/x-patch
Size: 6749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230727/9cfec5a5/attachment.bin>


More information about the cfe-commits mailing list