[all-commits] [llvm/llvm-project] 866f1c: [Clang] Stop changing DC when instantiating depend...

Younan Zhang via All-commits all-commits at lists.llvm.org
Tue May 13 20:45:55 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 866f1cd6a9146b3ee6ed012c0d90e02bc96d4e16
      https://github.com/llvm/llvm-project/commit/866f1cd6a9146b3ee6ed012c0d90e02bc96d4e16
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2025-05-14 (Wed, 14 May 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/test/SemaTemplate/GH55509.cpp

  Log Message:
  -----------
  [Clang] Stop changing DC when instantiating dependent friend specializations (#139436)

Since 346077aa, we began using the primary template's lexical
DeclContext for template arguments in order to properly instantiate a
friend definition.

There is a missed peculiar case, as in a friend template is specialized
within a dependent context. In this scenario, the primary template is
not a definition, whereas the specialization is. So the primary
template's DeclContext doesn't provide anything meaningful
for instantiation.

Fixes https://github.com/llvm/llvm-project/issues/139052



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