[all-commits] [llvm/llvm-project] 916cd5: [Clang] Avoid an extra `FunctionPrototypeScope` fo...

eiytoq via All-commits all-commits at lists.llvm.org
Mon Apr 27 09:47:03 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 916cd558c10bf520dd0c1bdd3849fa6163b53795
      https://github.com/llvm/llvm-project/commit/916cd558c10bf520dd0c1bdd3849fa6163b53795
  Author: eiytoq <eiytoq at outlook.com>
  Date:   2026-04-27 (Mon, 27 Apr 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Parse/Parser.h
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/test/CodeGenCXX/mangle-requires.cpp

  Log Message:
  -----------
  [Clang] Avoid an extra `FunctionPrototypeScope` for lambda trailing requires-clauses (#194068)

`ParseTrailingRequiresClause` currently always creates a synthetic
`FunctionPrototypeScope`. This is needed for ordinary function
declarators
whose prototype scope has already ended, but it is wrong for lambda
trailing
requires-clauses because they are parsed while the lambda prototype
scope is
still active.

The extra counted scope gives parameters in nested requires-expressions
an
incorrect function scope depth. Split the synthetic prototype-scope
setup from
the trailing requires-clause parser so the lambda path can parse the
clause in
the existing prototype scope.

Fixes: #123854
Fixes: #100774



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