21 lines · cpp
1// RUN: %clang_cc1 %s -emit-llvm -o %t2 3// PR52484namespace PR5248 {5struct A {6 void copyFrom(const A &src);7 void addRef(void);8 9 A& operator=(int);10};11 12void A::copyFrom(const A &src) {13 ((A &)src).addRef();14}15}16 17// reinterpret_cast to self18void test(PR5248::A* a) {19 reinterpret_cast<PR5248::A&>(*a) = 17;20}21