summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/reinterpret-cast.cpp
blob: dafa67529f770cfee0478eabe3b6c7d10de7474d (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clang_cc1 -emit-llvm -o - %s -std=c++11
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));
}