[all-commits] [llvm/llvm-project] 96a54b: [clang][deps] Account for transitive spurious depe...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Tue Jan 24 09:49:12 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96a54b2258cddcb52f8c98e760b9b114a1aa4034
      https://github.com/llvm/llvm-project/commit/96a54b2258cddcb52f8c98e760b9b114a1aa4034
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
    A clang/test/ClangScanDeps/modules-implementation-private.m

  Log Message:
  -----------
  [clang][deps] Account for transitive spurious dependencies

In D106100, we started guarding against spurious dependencies on modules that ended up being textual includes and thus didn't have any AST file associated. That patch accounted only for direct dependencies. There's a way how to get spurious dependencies for modules that are transitive. This patch guards against that scenario and adds a test case.

(Note that since D142167, we don't allow `@import FW_Private` with `-fmodule-name=FW` anymore. However, that check lives in sema, which the scanner doesn't run. Being defensive in this patch therefore still makes sense.)

rdar://104324602

Reviewed By: benlangmuir

Differential Revision: https://reviews.llvm.org/D142165




More information about the All-commits mailing list