Skip to content

Commit

Permalink
[clang] Mark CWG2009 as N/A
Browse files Browse the repository at this point in the history
[[https://wg21.link/p1787 | P1787]]: CWG2331 is resolved by defining lookup from complete-class contexts and out-of-line member definitions. The rest of CWG2009 is resolved by making it ill-formed NDR for forward lookup outside a complete-class context to change the results (before overload resolution, to avoid differences in instantiation).
Wording: The result of the search is the declaration set of S(N, T). If it is an invalid set, the program is ill-formed. If it differs from the result of a search in T for N from immediately after the class-specifier of T, the program is ill-formed, no diagnostic required. ([class.member.lookup]/7)

Reviewed By: #clang-language-wg, shafik

Differential Revision: https://reviews.llvm.org/D148263
  • Loading branch information
Endilll committed Apr 24, 2023
1 parent a4e420e commit 0a113c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions clang/test/CXX/drs/dr20xx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ int a = b2[0]; // expected-error {{does not provide a subscript operator}}
int b = __builtin_addressof(b2)->foo; // expected-error {{no member}}
}

// dr2009: na

namespace dr2026 { // dr2026: 11
template<int> struct X {};

Expand Down
2 changes: 1 addition & 1 deletion clang/www/cxx_dr_status.html
Original file line number Diff line number Diff line change
Expand Up @@ -11861,7 +11861,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
<td><a href="https://cplusplus.github.io/CWG/issues/2009.html">2009</a></td>
<td>CD6</td>
<td>Unclear specification of class scope</td>
<td class="none" align="center">Unknown</td>
<td class="na" align="center">N/A</td>
</tr>
<tr id="2010">
<td><a href="https://cplusplus.github.io/CWG/issues/2010.html">2010</a></td>
Expand Down

0 comments on commit 0a113c4

Please sign in to comment.