[all-commits] [llvm/llvm-project] 9974ed: [C++20] [Modules] Remove assertion of current modu...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Sat Oct 8 01:46:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9974ed804995d2e34be69404e9904c7e03cfbda4
      https://github.com/llvm/llvm-project/commit/9974ed804995d2e34be69404e9904c7e03cfbda4
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2022-10-08 (Sat, 08 Oct 2022)

  Changed paths:
    M clang/lib/Sema/SemaModule.cpp
    A clang/test/Modules/missing-module-declaration.cppm

  Log Message:
  -----------
  [C++20] [Modules] Remove assertion of current module when acting on import

Closes https://github.com/llvm/llvm-project/issues/58199

Previously, when we act on a import statement, we'll assume there is a
module declaration in the current TU if the command line tells us we're
compiling a module unit. This makes since on valid codes. However, for
invalid codes, it is possible. See
https://github.com/llvm/llvm-project/issues/58199 for example.

This patch removes the assertion. And the assertion is a noop and it
should be safe to remove it.




More information about the All-commits mailing list