summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/undefined-template.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:28 +0000
commit7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch)
treec72b9241553fc9966179aba84f90f17bfa9235c3 /test/SemaTemplate/undefined-template.cpp
parentb52119637f743680a99710ce5fdb6646da2772af (diff)
Diffstat (limited to 'test/SemaTemplate/undefined-template.cpp')
-rw-r--r--test/SemaTemplate/undefined-template.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaTemplate/undefined-template.cpp b/test/SemaTemplate/undefined-template.cpp
index a03d0b7cff626..7dfe2fde94b0a 100644
--- a/test/SemaTemplate/undefined-template.cpp
+++ b/test/SemaTemplate/undefined-template.cpp
@@ -134,6 +134,14 @@ void func_23(C1<int>::C2<long> *x) {
// expected-note@-1{{add an explicit instantiation declaration to suppress this warning if 'C1<int>::C2<long>::tmeth_2<int>' is explicitly instantiated in another translation unit}}
}
+namespace test_24 {
+ template <typename T> struct X {
+ friend void g(int);
+ operator int() { return 0; }
+ };
+ void h(X<int> x) { g(x); } // no warning for use of 'g' despite the declaration having been instantiated from a template
+}
+
int main() {
return 0;
}