r202889 - Add tests for newly-resolved core issues <= 370.
Richard Smith
richard-llvm at metafoo.co.uk
Tue Mar 4 13:14:30 PST 2014
Author: rsmith
Date: Tue Mar 4 15:14:30 2014
New Revision: 202889
URL: http://llvm.org/viewvc/llvm-project?rev=202889&view=rev
Log:
Add tests for newly-resolved core issues <= 370.
Modified:
cfe/trunk/test/CXX/drs/dr0xx.cpp
cfe/trunk/test/CXX/drs/dr1xx.cpp
cfe/trunk/test/CXX/drs/dr2xx.cpp
cfe/trunk/test/CXX/drs/dr3xx.cpp
cfe/trunk/www/cxx_dr_status.html
Modified: cfe/trunk/test/CXX/drs/dr0xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr0xx.cpp?rev=202889&r1=202888&r2=202889&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr0xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr0xx.cpp Tue Mar 4 15:14:30 2014
@@ -141,6 +141,21 @@ namespace dr12 { // dr12: sup 239
}
}
+namespace dr13 { // dr13: no
+ extern "C" void f(int);
+ void g(char);
+
+ template<typename T> struct A {
+ A(void (*fp)(T));
+ };
+ template<typename T> int h(void (T));
+
+ A<int> a1(f); // FIXME: We should reject this.
+ A<char> a2(g);
+ int a3 = h(f); // FIXME: We should reject this.
+ int a4 = h(g);
+}
+
namespace dr14 { // dr14: yes
namespace X { extern "C" int dr14_f(); }
namespace Y { extern "C" int dr14_f(); }
@@ -951,6 +966,22 @@ namespace dr91 { // dr91: yes
int k = f(U());
}
+namespace dr92 { // dr92: yes
+ void f() throw(int, float);
+ void (*p)() throw(int) = &f; // expected-error {{target exception specification is not superset of source}}
+ void (*q)() throw(int);
+ void (**pp)() throw() = &q; // expected-error {{exception specifications are not allowed}}
+
+ void g(void() throw());
+ void h() {
+ g(f); // expected-error {{is not superset}}
+ g(q); // expected-error {{is not superset}}
+ }
+
+ template<void() throw()> struct X {};
+ X<&f> xp; // ok
+}
+
// dr93: na
namespace dr94 { // dr94: yes
Modified: cfe/trunk/test/CXX/drs/dr1xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr1xx.cpp?rev=202889&r1=202888&r2=202889&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr1xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr1xx.cpp Tue Mar 4 15:14:30 2014
@@ -594,6 +594,8 @@ namespace dr155 { // dr155: dup 632
struct S { int n; } s = { { 1 } }; // expected-warning {{braces around scalar initializer}}
}
+// dr158 FIXME write codegen test
+
namespace dr159 { // dr159: 3.5
namespace X { void f(); }
void f();
Modified: cfe/trunk/test/CXX/drs/dr2xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr2xx.cpp?rev=202889&r1=202888&r2=202889&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr2xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr2xx.cpp Tue Mar 4 15:14:30 2014
@@ -216,8 +216,22 @@ namespace dr221 { // dr221: yes
}
}
-// 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.
+namespace dr222 { // dr222: dup 637
+ void f(int a, int b, int c, int *x) {
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wunsequenced"
+ void((a += b) += c);
+ void((a += b) + (a += c)); // expected-warning {{multiple unsequenced modifications to 'a'}}
+
+ x[a++] = a; // expected-warning {{unsequenced modification and access to 'a'}}
+
+ a = b = 0; // ok, read and write of 'b' are sequenced
+
+ a = (b = a++); // expected-warning {{multiple unsequenced modifications to 'a'}}
+ a = (b = ++a);
+#pragma clang diagnostic pop
+ }
+}
// dr223: na
@@ -363,6 +377,13 @@ namespace dr229 { // dr229: yes
template<> void f<int>() {}
}
+namespace dr230 { // dr230: yes
+ struct S {
+ S() { f(); } // expected-warning {{call to pure virtual member function}}
+ virtual void f() = 0; // expected-note {{declared here}}
+ };
+}
+
namespace dr231 { // dr231: yes
namespace outer {
namespace inner {
Modified: cfe/trunk/test/CXX/drs/dr3xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr3xx.cpp?rev=202889&r1=202888&r2=202889&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr3xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr3xx.cpp Tue Mar 4 15:14:30 2014
@@ -180,6 +180,15 @@ namespace dr313 { // dr313: dup 299 c++1
#endif
}
+namespace dr314 { // dr314: dup 1710
+ template<typename T> struct A {
+ template<typename U> struct B {};
+ };
+ template<typename T> struct C : public A<T>::template B<T> {
+ C() : A<T>::template B<T>() {}
+ };
+}
+
// dr315: na
// dr316: sup 1004
@@ -469,6 +478,22 @@ namespace dr341 {
// dr342: na
+namespace dr343 { // dr343: no
+ // FIXME: dup 1710
+ template<typename T> struct A {
+ template<typename U> struct B {};
+ };
+ // FIXME: In these contexts, the 'template' keyword is optional.
+ template<typename T> struct C : public A<T>::B<T> { // expected-error {{use 'template'}}
+ C() : A<T>::B<T>() {} // expected-error {{use 'template'}}
+ };
+}
+
+namespace dr344 { // dr344: dup 1435
+ struct A { inline virtual ~A(); };
+ struct B { friend A::~A(); };
+}
+
namespace dr345 { // dr345: yes
struct A {
struct X {};
Modified: cfe/trunk/www/cxx_dr_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_dr_status.html?rev=202889&r1=202888&r2=202889&view=diff
==============================================================================
--- cfe/trunk/www/cxx_dr_status.html (original)
+++ cfe/trunk/www/cxx_dr_status.html Tue Mar 4 15:14:30 2014
@@ -117,7 +117,7 @@
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#13">13</a></td>
<td>NAD</td>
<td>extern "C" for Parameters of Function Templates</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_closed.html#14">14</a></td>
@@ -591,7 +591,7 @@
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#92">92</a></td>
<td>NAD</td>
<td>Should <I>exception-specification</I>s be part of the type system?</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#93">93</a></td>
@@ -1372,7 +1372,7 @@ accessible?</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#222">222</a></td>
<td>CD1</td>
<td>Sequence points and lvalue-returning operators</td>
- <td class="none" align="center">Unknown</td>
+ <td class="none" align="center">Duplicate of 637</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#223">223</a></td>
@@ -1420,7 +1420,7 @@ accessible?</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#230">230</a></td>
<td>NAD</td>
<td>Calls to pure virtual 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_closed.html#231">231</a></td>
@@ -1925,7 +1925,7 @@ of class templates</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#314">314</a></td>
<td>ready</td>
<td><TT>template</TT> in base class specifier</td>
- <td class="none" align="center">Unknown</td>
+ <td class="none" align="center">Duplicate of 1710</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#315">315</a></td>
@@ -2099,13 +2099,13 @@ of class templates</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#343">343</a></td>
<td>ready</td>
<td>Make <TT>template</TT> optional in contexts that require a type</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#344">344</a></td>
<td>CD3</td>
<td>Naming destructors</td>
- <td class="none" align="center">Unknown</td>
+ <td class="none" align="center">Duplicate of 1435</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#345">345</a></td>
More information about the cfe-commits
mailing list