Skip to content

Commit fbc198c

Browse files
authored
[clang] Add test for CWG192 "Name lookup in parameters" (#121679)
This patch adds a rather simple test for [CWG192](https://cplusplus.github.io/CWG/issues/192.html). Parameter declarations of member functions are not complete-class contexts (unlike default arguments), so the example in the issue is ill-formed. Changes in [CWG1352](https://cplusplus.github.io/CWG/issues/1352.html) which resolved the issue, are superseded by the notion of complete-class context (https://eel.is/c++draft/class.mem#def:complete-class_context).
1 parent 8267bea commit fbc198c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

clang/test/CXX/drs/cwg1xx.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,6 +1364,14 @@ namespace cwg191 { // cwg191: yes
13641364
}
13651365
}
13661366

1367+
namespace cwg192 { // cwg192: 2.7
1368+
struct S {
1369+
void f(I i) { }
1370+
// expected-error@-1 {{unknown type name 'I'}}
1371+
typedef int I;
1372+
};
1373+
} // namespace cwg192
1374+
13671375
// cwg193 is in cwg193.cpp
13681376

13691377
namespace cwg194 { // cwg194: yes

clang/www/cxx_dr_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
11971197
<td><a href="https://cplusplus.github.io/CWG/issues/192.html">192</a></td>
11981198
<td>NAD</td>
11991199
<td>Name lookup in parameters</td>
1200-
<td class="unknown" align="center">Unknown</td>
1200+
<td class="full" align="center">Clang 2.7</td>
12011201
</tr>
12021202
<tr id="193">
12031203
<td><a href="https://cplusplus.github.io/CWG/issues/193.html">193</a></td>

0 commit comments

Comments
 (0)