[clang] Add test for CWG1822
authorVlad Serebrennikov <serebrennikov.vladislav@gmail.com>
Tue, 11 Apr 2023 08:07:00 +0000 (11:07 +0300)
committerVlad Serebrennikov <serebrennikov.vladislav@gmail.com>
Tue, 11 Apr 2023 08:08:22 +0000 (11:08 +0300)
commit86946ebb796c4ccde85b34aa52964e9aadabc692
tree89d50de2ee89e268a3ae14b8637912483ea79924
parent03dcd9da1ae567b2c37c8c3838b2f8ea1095d835
[clang] Add test for CWG1822

[[https://wg21.link/p1787 | P1787]]: CWG1822 is resolved by specifying that the body of a lambda remains in the surrounding (function parameter) scope.
Wording: A parameter-declaration-clause P introduces a function parameter scope that includes P. <...> If P is associated with a lambda-declarator, its scope extends to the end of the compound-statement in the lambda-expression. ([basic.scope.param])

Reviewed By: #clang-language-wg, shafik

Differential Revision: https://reviews.llvm.org/D147836
clang/test/CXX/drs/dr18xx.cpp
clang/www/cxx_dr_status.html