diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
commit | 51fb8b013e7734b795139f49d3b1f77c539be20a (patch) | |
tree | 59e0e47a9831dcf0e21e547927c8ebb7e113bfd1 /test/CodeGenCXX/ptr-to-datamember.cpp | |
parent | 73490b890977362d28dd6326843a1ecae413921d (diff) | |
download | src-51fb8b013e7734b795139f49d3b1f77c539be20a.tar.gz src-51fb8b013e7734b795139f49d3b1f77c539be20a.zip |
Update clang to r86025.vendor/clang/clang-r86025
Notes
Notes:
svn path=/vendor/clang/dist/; revision=198893
svn path=/vendor/clang/clang-r86025/; revision=198895; tag=vendor/clang/clang-r86025
Diffstat (limited to 'test/CodeGenCXX/ptr-to-datamember.cpp')
-rw-r--r-- | test/CodeGenCXX/ptr-to-datamember.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenCXX/ptr-to-datamember.cpp b/test/CodeGenCXX/ptr-to-datamember.cpp index eee03c060f91..a7b4cc2f7afb 100644 --- a/test/CodeGenCXX/ptr-to-datamember.cpp +++ b/test/CodeGenCXX/ptr-to-datamember.cpp @@ -51,6 +51,21 @@ void test_aggr_pdata(A& a1) { pr(a1.*af); } +void test_aggr_pdata_1(A* pa) { + F A::* af = &A::Af; + pr(pa->*af); + + (pa->*af).iF = 100; + (pa->*af).fF = 200.00; + printf(" %d %f\n", (pa->*af).iF, (pa->*af).fF); + pr(pa->*af); + + (pa->*af).iF++; + (pa->*af).fF--; + --(pa->*af).fF; + pr(pa->*af); +} + int main() { A a1; @@ -67,4 +82,5 @@ int main() printf("%d\n", &A::B1::V::iV); printf("%d, %f, %f \n", a1.*pa, a1.*pf, a1.*pd); test_aggr_pdata(a1); + test_aggr_pdata_1(&a1); } |