[all-commits] [llvm/llvm-project] 6e6c50: [Concepts] Traverse the instantiation chain for pa...

Younan Zhang via All-commits all-commits at lists.llvm.org
Fri Jan 26 23:43:04 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e6c506f3caeafc25925b811b9cd205e2e213dd6
      https://github.com/llvm/llvm-project/commit/6e6c506f3caeafc25925b811b9cd205e2e213dd6
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2024-01-27 (Sat, 27 Jan 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaConcept.cpp
    M clang/test/SemaTemplate/concepts-lambda.cpp

  Log Message:
  -----------
  [Concepts] Traverse the instantiation chain for parameter injection inside a constraint scope (#79568)

We preserve the trailing requires-expression during the lambda
expression transformation. In order to get those referenced parameters
inside a requires-expression properly resolved to the instantiated
decls, we intended to inject these 'original' `ParmVarDecls` to the
current instantiaion scope, at `Sema::SetupConstraintScope`.

The previous approach seems to overlook nested instantiation chains,
leading to the crash within a nested lambda followed by a requires
clause.

This fixes https://github.com/llvm/llvm-project/issues/73418.




More information about the All-commits mailing list