[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / CodeGenCXX / casts.cpp
blob436b722e69d2714d6dfc672f39986f6b68d6fe44
1 // RUN: %clang_cc1 %s -emit-llvm -o %t
3 // PR5248
4 namespace PR5248 {
5 struct A {
6 void copyFrom(const A &src);
7 void addRef(void);
9 A& operator=(int);
12 void A::copyFrom(const A &src) {
13 ((A &)src).addRef();
17 // reinterpret_cast to self
18 void test(PR5248::A* a) {
19 reinterpret_cast<PR5248::A&>(*a) = 17;