[all-commits] [llvm/llvm-project] 4d6292: [C++20] [Modules] Disambuguous Clang module and C+...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Tue Mar 12 22:58:35 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d62929852849f768d7397f634cfdebc85de96a4
      https://github.com/llvm/llvm-project/commit/4d62929852849f768d7397f634cfdebc85de96a4
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/LangOptions.h
    M clang/include/clang/Frontend/FrontendActions.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/Parser.cpp
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaModule.cpp
    M clang/test/CXX/module/dcl.dcl/dcl.module/dcl.module.interface/p1.cppm
    R clang/test/Modules/missing-module-declaration.cppm
    M clang/test/Modules/pr72828.cppm

  Log Message:
  -----------
  [C++20] [Modules] Disambuguous Clang module and C++20 Named module further

This patch tries to make the boundary of clang module and C++20 named
module more clear.

The changes included:

- Rename `TranslationUnitKind::TU_Module` to
  `TranslationUnitKind::TU_ClangModule`.
- Rename `Sema::ActOnModuleInclude` to `Sema::ActOnAnnotModuleInclude`.
- Rename `ActOnModuleBegin` to `Sema::ActOnAnnotModuleBegin`.
- Rename `Sema::ActOnModuleEnd` to `Sema::ActOnAnnotModuleEnd`.
- Removes a warning if we're trying to compile a non-module unit as
  C++20 module unit. This is not actually useful and makes (the future)
  implementation unnecessarily complex.

This patch meant to be a NFC fix. But it shows that it fixed a bug
suprisingly that previously we would surppress the unused-value warning
in named modules. Because it shares the same logic with clang modules,
which has headers semantics. This shows the change is meaningful.



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