forked from OSchip/llvm-project
parent
8e3c8584e9
commit
b09a4fe192
|
@ -111,3 +111,109 @@ namespace dr215 { // dr215: yes
|
|||
void foo() { (void)+X<Y>().n; }
|
||||
};
|
||||
}
|
||||
|
||||
namespace dr216 { // dr216: no
|
||||
// FIXME: Should reject this: 'f' has linkage but its type does not,
|
||||
// and 'f' is odr-used but not defined in this TU.
|
||||
typedef enum { e } *E;
|
||||
void f(E);
|
||||
void g(E e) { f(e); }
|
||||
|
||||
struct S {
|
||||
// FIXME: Should reject this: 'f' has linkage but its type does not,
|
||||
// and 'f' is odr-used but not defined in this TU.
|
||||
typedef enum { e } *E;
|
||||
void f(E);
|
||||
};
|
||||
void g(S s, S::E e) { s.f(e); }
|
||||
}
|
||||
|
||||
namespace dr217 { // dr217: yes
|
||||
template<typename T> struct S {
|
||||
void f(int);
|
||||
};
|
||||
template<typename T> void S<T>::f(int = 0) {} // expected-error {{default arguments cannot be added}}
|
||||
}
|
||||
|
||||
namespace dr218 { // dr218: yes
|
||||
namespace A {
|
||||
struct S {};
|
||||
void f(S);
|
||||
}
|
||||
namespace B {
|
||||
struct S {};
|
||||
void f(S);
|
||||
}
|
||||
|
||||
struct C {
|
||||
int f;
|
||||
void test1(A::S as) { f(as); } // expected-error {{called object type 'int'}}
|
||||
void test2(A::S as) { void f(); f(as); } // expected-error {{too many arguments}} expected-note {{}}
|
||||
void test3(A::S as) { using A::f; f(as); } // ok
|
||||
void test4(A::S as) { using B::f; f(as); } // ok
|
||||
void test5(A::S as) { int f; f(as); } // expected-error {{called object type 'int'}}
|
||||
void test6(A::S as) { struct f {}; (void) f(as); } // expected-error {{no matching conversion}} expected-note +{{}}
|
||||
};
|
||||
|
||||
namespace D {
|
||||
struct S {};
|
||||
struct X { void operator()(S); } f;
|
||||
}
|
||||
void testD(D::S ds) { f(ds); } // expected-error {{undeclared identifier}}
|
||||
|
||||
namespace E {
|
||||
struct S {};
|
||||
struct f { f(S); };
|
||||
}
|
||||
void testE(E::S es) { f(es); } // expected-error {{undeclared identifier}}
|
||||
|
||||
namespace F {
|
||||
struct S {
|
||||
template<typename T> friend void f(S, T) {}
|
||||
};
|
||||
}
|
||||
void testF(F::S fs) { f(fs, 0); }
|
||||
|
||||
namespace G {
|
||||
namespace X {
|
||||
int f;
|
||||
struct A {};
|
||||
}
|
||||
namespace Y {
|
||||
template<typename T> void f(T);
|
||||
struct B {};
|
||||
}
|
||||
template<typename A, typename B> struct C {};
|
||||
}
|
||||
void testG(G::C<G::X::A, G::Y::B> gc) { f(gc); }
|
||||
}
|
||||
|
||||
// dr219: na
|
||||
// dr220: na
|
||||
|
||||
namespace dr221 { // dr221: yes
|
||||
struct A {
|
||||
A &operator=(int&);
|
||||
A &operator+=(int&);
|
||||
static A &operator=(A&, double&); // expected-error {{cannot be a static member}}
|
||||
static A &operator+=(A&, double&); // expected-error {{cannot be a static member}}
|
||||
friend A &operator=(A&, char&); // expected-error {{must be a non-static member function}}
|
||||
friend A &operator+=(A&, char&);
|
||||
};
|
||||
A &operator=(A&, float&); // expected-error {{must be a non-static member function}}
|
||||
A &operator+=(A&, float&);
|
||||
|
||||
void test(A a, int n, char c, float f) {
|
||||
a = n;
|
||||
a += n;
|
||||
a = c;
|
||||
a += c;
|
||||
a = f;
|
||||
a += f;
|
||||
}
|
||||
}
|
||||
|
||||
// dr222 is a mystery -- it lists no changes to the standard, and yet was
|
||||
// apparently both voted into the WP and acted upon by the editor.
|
||||
|
||||
// dr223: na
|
||||
|
|
|
@ -1335,37 +1335,37 @@ accessible?</td>
|
|||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#216">216</a></td>
|
||||
<td>CD1</td>
|
||||
<td>Linkage of nameless class-scope enumeration types</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="none" align="center">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#217">217</a></td>
|
||||
<td>TC1</td>
|
||||
<td>Default arguments for non-template member functions of class templates</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="full" align="center">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#218">218</a></td>
|
||||
<td>CD1</td>
|
||||
<td>Specification of Koenig lookup</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="full" align="center">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#219">219</a></td>
|
||||
<td>NAD</td>
|
||||
<td>Cannot defend against destructors that throw exceptions</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="na" align="center">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#220">220</a></td>
|
||||
<td>CD1</td>
|
||||
<td>All deallocation functions should be required not to throw</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="na" align="center">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#221">221</a></td>
|
||||
<td>CD1</td>
|
||||
<td>Must compound assignment operators be member functions?</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="full" align="center">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#222">222</a></td>
|
||||
|
@ -1377,7 +1377,7 @@ accessible?</td>
|
|||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#223">223</a></td>
|
||||
<td>DRWP</td>
|
||||
<td>The meaning of deprecation</td>
|
||||
<td class="none" align="center">Unknown</td>
|
||||
<td class="na" align="center">N/A</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#224">224</a></td>
|
||||
|
|
|
@ -131,6 +131,7 @@ def availability(issue):
|
|||
assert False, 'unknown status %s for issue %s' % (status, dr.issue)
|
||||
return (avail, avail_style)
|
||||
|
||||
count = {}
|
||||
for dr in drs:
|
||||
if dr.status in ('concepts',):
|
||||
# Yeah, cool story bro.
|
||||
|
@ -144,6 +145,8 @@ for dr in drs:
|
|||
else:
|
||||
row_style = ''
|
||||
avail, avail_style = availability(dr.issue)
|
||||
if not avail.startswith('Sup') and not avail.startswith('Dup'):
|
||||
count[avail] = count.get(avail, 0) + 1
|
||||
|
||||
print >> out_file, '''\
|
||||
<tr%s>
|
||||
|
@ -154,6 +157,9 @@ for dr in drs:
|
|||
</tr>''' % (row_style, dr.url, dr.issue, dr.status, dr.title, avail_style,
|
||||
avail)
|
||||
|
||||
for status, num in count.items():
|
||||
print "%s: %s" % (status, num)
|
||||
|
||||
print >> out_file, '''\
|
||||
</table>
|
||||
|
||||
|
|
Loading…
Reference in New Issue