[all-commits] [llvm/llvm-project] 71a827: [clang] fix broken canonicalization of DeducedTemp...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Wed Jun 12 00:17:56 PDT 2024


  Branch: refs/heads/users/mizvekov/clang-fix-61317
  Home:   https://github.com/llvm/llvm-project
  Commit: 71a827e8ff6dcc47f1fd434a19070e6f841ee27a
      https://github.com/llvm/llvm-project/commit/71a827e8ff6dcc47f1fd434a19070e6f841ee27a
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2024-06-12 (Wed, 12 Jun 2024)

  Changed paths:
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/AST/TemplateName.h
    M clang/include/clang/AST/Type.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/AST/TemplateName.cpp

  Log Message:
  -----------
  [clang] fix broken canonicalization of DeducedTemplateSpecializationType

This reverts the functional elements of commit 3e78fa860235431323aaf08c8fa922d75a7cfffa
and redoes it, by fixing the true root cause of #61317.

A TemplateName can be non-canonical; profiling it based on the canonical
name would result in inconsistent preservation of as-written information
in the AST.

The true problem in #61317 is that we would not consider the methods
with requirements expression which contain DTSTs as the same
in relation to merging of declarations when importing modules.

The expressions would never match because they contained DTSTs pointing
to different redeclarations of the same class template, but since
canonicalization for them was broken, their canonical types would not
match either.

---

No changelog entry because #61317 was already claimed as fixed in
previous release.



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