diff options
author | John McCall <rjmccall@apple.com> | 2009-12-19 02:05:44 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-12-19 02:05:44 +0000 |
commit | 7173903ea658e70728178844e6bca057f5708b80 (patch) | |
tree | 73454ab854948745299ee02a697bb729aa9691f0 /clang/test/SemaTemplate/member-access-expr.cpp | |
parent | d7e4a095c9fcc6f34453dc7dfe6b5b14d93a6142 (diff) | |
download | bcm5719-llvm-7173903ea658e70728178844e6bca057f5708b80.tar.gz bcm5719-llvm-7173903ea658e70728178844e6bca057f5708b80.zip |
Unresolved implicit member accesses are dependent if the object type is dependent.
Avoids an assertion arising during object-argument initialization in overload
resolution. In theory we can resolve this at definition time if the class
hierarchy for the member is fully known.
llvm-svn: 91747
Diffstat (limited to 'clang/test/SemaTemplate/member-access-expr.cpp')
-rw-r--r-- | clang/test/SemaTemplate/member-access-expr.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/member-access-expr.cpp b/clang/test/SemaTemplate/member-access-expr.cpp index 51de64a3b47..116e8377b36 100644 --- a/clang/test/SemaTemplate/member-access-expr.cpp +++ b/clang/test/SemaTemplate/member-access-expr.cpp @@ -105,3 +105,17 @@ void test_X5(X5<X4> x5, X5<const X4> x5c, X4 *xp, const X4 *cxp) { x5.f(xp); x5c.g(cxp); } + +// In theory we can do overload resolution at template-definition time on this. +// We should at least not assert. +namespace test4 { + struct Base { + template <class T> void foo() {} + }; + + template <class T> struct Foo : Base { + void test() { + foo<int>(); + } + }; +} |