minix/external/bsd/llvm/dist/clang/test/CodeGenCXX/reinterpret-cast.cpp
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

19 lines
360 B
C++

// RUN: %clang_cc1 -emit-llvm -o - %s -std=c++11
// REQUIRES: LP64
void *f1(unsigned long l) {
return reinterpret_cast<void *>(l);
}
unsigned long f2() {
return reinterpret_cast<unsigned long>(nullptr);
}
unsigned long f3(void *p) {
return reinterpret_cast<unsigned long>(p);
}
void f4(int*&);
void f5(void*& u) {
f4(reinterpret_cast<int*&>(u));
}