[all-commits] [llvm/llvm-project] 4bb04d: [clang][modules] Fix local submodule visibility of...

Ben Langmuir via All-commits all-commits at lists.llvm.org
Fri Feb 21 10:05:06 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4bb04d417669be7a3d0359dfd313f0bf4f7ca531
      https://github.com/llvm/llvm-project/commit/4bb04d417669be7a3d0359dfd313f0bf4f7ca531
  Author: Ben Langmuir <blangmuir at apple.com>
  Date:   2025-02-21 (Fri, 21 Feb 2025)

  Changed paths:
    M clang/include/clang/Basic/Module.h
    M clang/include/clang/Lex/Preprocessor.h
    M clang/lib/Basic/Module.cpp
    M clang/lib/Lex/PPLexerChange.cpp
    M clang/lib/Lex/Preprocessor.cpp
    A clang/test/Modules/local-submodule-visibility-transitive-import.c

  Log Message:
  -----------
  [clang][modules] Fix local submodule visibility of macros from transitive import (#122955)

When we mark a module visible, we normally mark all of its non-explicit
submodules and other exports as visible. However, when we first enter a
submodule we should not make them visible to the submodule itself until
they are actually imported. Marking exports visible before import would
cause bizarre behaviour with local submodule visibility, because it
happened before we discovered the submodule's transitive imports and
could fail to make them visible in the parent module depending on
whether the submodules involved were explicitly defined (module X) or
implicitly defined from an umbrella (module *).

rdar://136524433



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list