xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/reinterpret-cast.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -o - %s -std=c++11
2*f4a2713aSLionel Sambuc // REQUIRES: LP64
3*f4a2713aSLionel Sambuc 
f1(unsigned long l)4*f4a2713aSLionel Sambuc void *f1(unsigned long l) {
5*f4a2713aSLionel Sambuc   return reinterpret_cast<void *>(l);
6*f4a2713aSLionel Sambuc }
7*f4a2713aSLionel Sambuc 
f2()8*f4a2713aSLionel Sambuc unsigned long f2() {
9*f4a2713aSLionel Sambuc   return reinterpret_cast<unsigned long>(nullptr);
10*f4a2713aSLionel Sambuc }
11*f4a2713aSLionel Sambuc 
f3(void * p)12*f4a2713aSLionel Sambuc unsigned long f3(void *p) {
13*f4a2713aSLionel Sambuc   return reinterpret_cast<unsigned long>(p);
14*f4a2713aSLionel Sambuc }
15*f4a2713aSLionel Sambuc 
16*f4a2713aSLionel Sambuc void f4(int*&);
f5(void * & u)17*f4a2713aSLionel Sambuc void f5(void*& u) {
18*f4a2713aSLionel Sambuc   f4(reinterpret_cast<int*&>(u));
19*f4a2713aSLionel Sambuc }
20