aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/member-access-expr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-06 05:26:58 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-06 05:26:58 +0000
commit01b2e4e3e2fbd60e62539f7e8e8b99575fa8a5b0 (patch)
tree7c2cf9e1e7da36c260b9d03ba619dc0617cea4b1 /test/SemaTemplate/member-access-expr.cpp
parent0074b48fb8ea5040de546c79be43916efe0c1f76 (diff)
Clarify the logic for when to build an overloaded binop. In particular,
build one when either of the operands calls itself type-dependent; previously we were building when one of the operand types was dependent, which is not always the same thing and which can lead to unfortunate inconsistencies later. Fixes PR8739. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/member-access-expr.cpp')
-rw-r--r--test/SemaTemplate/member-access-expr.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaTemplate/member-access-expr.cpp b/test/SemaTemplate/member-access-expr.cpp
index 16b9515a15..f1aa30ec32 100644
--- a/test/SemaTemplate/member-access-expr.cpp
+++ b/test/SemaTemplate/member-access-expr.cpp
@@ -132,3 +132,18 @@ namespace test5 {
}
};
}
+
+// PR8739
+namespace test6 {
+ struct A {};
+ struct B {};
+ template <class T> class Base;
+ template <class T> class Derived : public Base<T> {
+ A *field;
+ void get(B **ptr) {
+ // It's okay if at some point we figure out how to diagnose this
+ // at instantiation time.
+ *ptr = field;
+ }
+ };
+}