summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-complete.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-11-13 19:36:57 +0000
committerDouglas Gregor <dgregor@apple.com>2010-11-13 19:36:57 +0000
commit72ebdabc5d60eab7ae6bba89de0368d032121f1e (patch)
tree6ed3605746550d8a03fb0ac316efc9fb4084b85a /clang/test/SemaTemplate/instantiate-complete.cpp
parentfc8aefb0bad54071df0943da8c84577d60dbb605 (diff)
downloadbcm5719-llvm-72ebdabc5d60eab7ae6bba89de0368d032121f1e.tar.gz
bcm5719-llvm-72ebdabc5d60eab7ae6bba89de0368d032121f1e.zip
When we're type-checking the result of calling a conversion function
(while computing user conversion sequences), make sure that a result of class type is a complete class type. Had we gone through ActOnCallExpr, this would have happened when we built the CallExpr. Fixes PR8425. llvm-svn: 119005
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-complete.cpp')
-rw-r--r--clang/test/SemaTemplate/instantiate-complete.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-complete.cpp b/clang/test/SemaTemplate/instantiate-complete.cpp
index 91d4d327073..4b27da7349f 100644
--- a/clang/test/SemaTemplate/instantiate-complete.cpp
+++ b/clang/test/SemaTemplate/instantiate-complete.cpp
@@ -126,3 +126,23 @@ namespace pr7199 {
template class B<int>; // expected-note {{in instantiation}}
}
+
+namespace PR8425 {
+ template <typename T>
+ class BaseT {};
+
+ template <typename T>
+ class DerivedT : public BaseT<T> {};
+
+ template <typename T>
+ class FromT {
+ public:
+ operator DerivedT<T>() const { return DerivedT<T>(); }
+ };
+
+ void test() {
+ FromT<int> ft;
+ BaseT<int> bt(ft);
+ }
+}
+
OpenPOWER on IntegriCloud