summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/ptr-to-datamember.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/ptr-to-datamember.cpp')
-rw-r--r--clang/test/CodeGenCXX/ptr-to-datamember.cpp28
1 files changed, 23 insertions, 5 deletions
diff --git a/clang/test/CodeGenCXX/ptr-to-datamember.cpp b/clang/test/CodeGenCXX/ptr-to-datamember.cpp
index 86c771a8b0a..7e945a20dcd 100644
--- a/clang/test/CodeGenCXX/ptr-to-datamember.cpp
+++ b/clang/test/CodeGenCXX/ptr-to-datamember.cpp
@@ -2,9 +2,23 @@
extern "C" int printf(...);
-class A {
+struct V {
+ double d;
+ int iV;
+};
+
+struct B : virtual V{
+ double d;
+ int iB;
+};
+
+struct B1 : virtual V{
+ double d;
+ int iB1;
+};
+
+class A : public B, public B1 {
public:
- A() : f(1.0), d(2.0), Ai(100) {}
float f;
double d;
int Ai;
@@ -17,9 +31,13 @@ int main()
float A::* pf = &A::f;
double A::* pd = &A::d;
printf("%d %d %d\n", &A::Ai, &A::f, &A::d);
-
+ printf("%d\n", &A::B::iB);
+ printf("%d\n", &A::B1::iB1);
+ printf("%d\n", &A::f);
+ printf("%d\n", &A::B::iV);
+ printf("%d\n", &A::B1::iV);
+ printf("%d\n", &A::B::V::iV);
+ printf("%d\n", &A::B1::V::iV);
// FIXME. NYI
// printf(" %d, %f, %f \n", a1.*pa, a1.f, a1.d);
}
-
-
OpenPOWER on IntegriCloud