[all-commits] [llvm/llvm-project] 0c4f0b: [C++20] [Modules] Only allow redeclarations in par...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Sat Oct 8 02:45:02 PDT 2022


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

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    A clang/test/Modules/inconsistent-deduction-guide-linkage.cppm

  Log Message:
  -----------
  [C++20] [Modules] Only allow redeclarations in partitions if they are in the same module

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

The root cause for the problem is an oversight in
https://reviews.llvm.org/D127624, which allows the redeclarations in
partitions. However, we took a mistake there that we should only allow
it if the redeclarations in the one same module instead of return
directly if either the redeclaration lives in a partition. The original
implementation makes no sense and I believe it was an oversight.




More information about the All-commits mailing list