summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-04-01 01:58:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-04-01 01:58:11 +0000
commit5557f6d6787c68719ce657cb5fee66b322f40c23 (patch)
tree690685124be9072b72230667e8aa40fcd4230055
parentfc6297f31499b13f297ec909dd309a1e89096b26 (diff)
downloadbcm5719-llvm-5557f6d6787c68719ce657cb5fee66b322f40c23.tar.gz
bcm5719-llvm-5557f6d6787c68719ce657cb5fee66b322f40c23.zip
Add failing testcase for DR305. Looks like we didn't implement the resolution
here in the simple-template-id case. llvm-svn: 205273
-rw-r--r--clang/test/CXX/drs/dr3xx.cpp21
-rw-r--r--clang/www/cxx_dr_status.html4
2 files changed, 22 insertions, 3 deletions
diff --git a/clang/test/CXX/drs/dr3xx.cpp b/clang/test/CXX/drs/dr3xx.cpp
index c58fb8fe94c..53fc20e23fe 100644
--- a/clang/test/CXX/drs/dr3xx.cpp
+++ b/clang/test/CXX/drs/dr3xx.cpp
@@ -82,7 +82,7 @@ namespace dr304 { // dr304: yes
#endif
}
-namespace dr305 { // dr305: yes
+namespace dr305 { // dr305: no
struct A {
typedef A C;
};
@@ -109,6 +109,18 @@ namespace dr305 { // dr305: yes
x->~X<char>(); // expected-error {{no member named}}
}
+ // FIXME: This appears to be valid (but allowing the nested types might be a
+ // defect).
+ template<typename> struct Nested {
+ template<typename> struct Nested {};
+ };
+ void testNested(Nested<int> n) { n.~Nested<int>(); } // expected-error {{no member named}}
+#if __cplusplus < 201103L
+ // expected-error@-2 {{ambiguous}}
+ // expected-note@-6 {{here}}
+ // expected-note@-6 {{here}}
+#endif
+
#if __cplusplus >= 201103L
struct Y {
template<typename T> using T1 = Y;
@@ -127,6 +139,13 @@ namespace dr305 { // dr305: yes
z->~T2<int>(); // expected-error {{no member named '~int'}}
z->~T2<Z>();
}
+
+ // FIXME: This is valid.
+ namespace Q {
+ template<typename A> struct R {};
+ }
+ template<typename A> using R = Q::R<int>;
+ void qr(Q::R<int> x) { x.~R<char>(); } // expected-error {{no member named}}
#endif
}
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index a90d3f76738..73bb160e49e 100644
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -1871,7 +1871,7 @@ of class templates</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#305">305</a></td>
<td>CD1</td>
<td>Name lookup in destructor call</td>
- <td class="full" align="center">Yes</td>
+ <td class="none" align="center">No</td>
</tr>
<tr id="306">
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#306">306</a></td>
@@ -2525,7 +2525,7 @@ of class templates</td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#414">414</a></td>
<td>CD1</td>
<td>Multiple types found on destructor lookup</td>
- <td class="full" align="center">Duplicate of <a href="#305">305</a></td>
+ <td class="none" align="center">Duplicate of <a href="#305">305</a></td>
</tr>
<tr id="415">
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#415">415</a></td>
OpenPOWER on IntegriCloud