diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-11-05 17:18:09 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-11-05 17:18:09 +0000 |
commit | b3a51061b1b9c4add078237850649f7c9efb13ab (patch) | |
tree | 8b316eca843681b024034db1125707173b9adb4a /test/CodeGenCXX/ptr-to-datamember.cpp | |
parent | b6d5e15aae202f157c6cd63da8fa4b089e7b31e9 (diff) | |
download | FreeBSD-src-b3a51061b1b9c4add078237850649f7c9efb13ab.zip FreeBSD-src-b3a51061b1b9c4add078237850649f7c9efb13ab.tar.gz |
Update clang to r86140.
Diffstat (limited to 'test/CodeGenCXX/ptr-to-datamember.cpp')
-rw-r--r-- | test/CodeGenCXX/ptr-to-datamember.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenCXX/ptr-to-datamember.cpp b/test/CodeGenCXX/ptr-to-datamember.cpp index a7b4cc2..ffaef32 100644 --- a/test/CodeGenCXX/ptr-to-datamember.cpp +++ b/test/CodeGenCXX/ptr-to-datamember.cpp @@ -32,6 +32,15 @@ public: F Af; }; +template <typename T> struct TT { + int T::t::*pti; +}; + +struct I { + typedef I t; + int x; +}; + void pr(const F& b) { printf(" %d %f\n", b.iF, b.fF); } @@ -69,9 +78,12 @@ void test_aggr_pdata_1(A* pa) { int main() { A a1; + TT<I> tt; + I i; int A::* pa = &A::Ai; float A::* pf = &A::f; double A::* pd = &A::d; + tt.pti = &I::x; printf("%d %d %d\n", &A::Ai, &A::f, &A::d); printf("%d\n", &A::B::iB); printf("%d\n", &A::B1::iB1); @@ -81,6 +93,7 @@ int main() printf("%d\n", &A::B::V::iV); printf("%d\n", &A::B1::V::iV); printf("%d, %f, %f \n", a1.*pa, a1.*pf, a1.*pd); + printf("%d\n", i.*tt.pti); test_aggr_pdata(a1); test_aggr_pdata_1(&a1); } |