summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-method.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-24 15:23:48 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-24 15:23:48 +0000
commit5842ba9fd482bb2fe5198b32c2ae549cd5474e6d (patch)
tree5eb6082ee5fcb3648d63fb7ee4398da2607c949a /test/SemaTemplate/instantiate-method.cpp
parent19b7b158699983e70693c73f3b982fd16c056585 (diff)
downloadclang-5842ba9fd482bb2fe5198b32c2ae549cd5474e6d.tar.gz
Try to complete a type before looking for conversion functions within
that type. Note that we do not produce a diagnostic if the type is incomplete; rather, we just don't look for conversion functions. Fixes PR4660. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-method.cpp')
-rw-r--r--test/SemaTemplate/instantiate-method.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-method.cpp b/test/SemaTemplate/instantiate-method.cpp
index daea7465dc..f7c09ef879 100644
--- a/test/SemaTemplate/instantiate-method.cpp
+++ b/test/SemaTemplate/instantiate-method.cpp
@@ -72,3 +72,12 @@ void test_converts_to(ConvertsTo<int> ci, ConvertsTo<int *> cip) {
int i = ci;
int *ip = cip;
}
+
+// PR4660
+template<class T> struct A0 { operator T*(); };
+template<class T> struct A1;
+
+int *a(A0<int> &x0, A1<int> &x1) {
+ int *y0 = x0;
+ int *y1 = x1; // expected-error{{initializing}}
+}