[all-commits] [llvm/llvm-project] f8b961: [Clang] skip default argument instantiation for no...

Oleksandr T. via All-commits all-commits at lists.llvm.org
Thu Nov 7 09:13:25 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8b96160feb99b3fc37b1857caf2abcfea7e5a06
      https://github.com/llvm/llvm-project/commit/f8b96160feb99b3fc37b1857caf2abcfea7e5a06
  Author: Oleksandr T. <oleksandr.tarasiuk at outlook.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/CXX/temp/temp.res/p4.cpp

  Log Message:
  -----------
  [Clang] skip default argument instantiation for non-defining friend declarations (#113777)

This fixes a crash when instantiating default arguments for templated
friend function declarations which lack a definition.
There are implementation limits which prevents us from finding the
pattern for such functions, and this causes difficulties
setting up the instantiation scope for the function parameters.

This patch skips instantiating the default argument in these cases,
which causes a minor regression in error recovery, but otherwise avoids
the crash.

Fixes #113324



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