Author: Vlad Serebrennikov Date: 2023-04-11T11:08:22+03:00 New Revision: 86946ebb796c4ccde85b34aa52964e9aadabc692
URL: https://github.com/llvm/llvm-project/commit/86946ebb796c4ccde85b34aa52964e9aadabc692 DIFF: https://github.com/llvm/llvm-project/commit/86946ebb796c4ccde85b34aa52964e9aadabc692.diff LOG: [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 Added: Modified: clang/test/CXX/drs/dr18xx.cpp clang/www/cxx_dr_status.html Removed: ################################################################################ diff --git a/clang/test/CXX/drs/dr18xx.cpp b/clang/test/CXX/drs/dr18xx.cpp index a2a1a5cae0741..55f79295934c8 100644 --- a/clang/test/CXX/drs/dr18xx.cpp +++ b/clang/test/CXX/drs/dr18xx.cpp @@ -50,6 +50,15 @@ namespace dr1815 { // dr1815: no #endif } +namespace dr1822 { // dr1822: yes +#if __cplusplus >= 201103L + int a; + auto x = [] (int a) { +#pragma clang __debug dump a // CHECK: ParmVarDecl + }; +#endif +} + namespace dr1872 { // dr1872: 9 #if __cplusplus >= 201103L template<typename T> struct A : T { diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 4621e6e851cdf..6e234f63fc015 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -10739,7 +10739,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://wg21.link/cwg1822">1822</a></td> <td>CD6</td> <td>Lookup of parameter names in <I>lambda-expression</I>s</td> - <td class="none" align="center">Unknown</td> + <td class="full" align="center">Yes</td> </tr> <tr id="1823"> <td><a href="https://wg21.link/cwg1823">1823</a></td> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits