Anders Carlsson | 7f9e646 | 2009-09-15 04:48:33 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -emit-llvm -o - %s -std=c++0x |
| 2 | void *f1(unsigned long l) { |
| 3 | return reinterpret_cast<void *>(l); |
| 4 | } |
| 5 | |
| 6 | unsigned long f2() { |
| 7 | return reinterpret_cast<unsigned long>(nullptr); |
| 8 | } |
| 9 | |
| 10 | unsigned long f3(void *p) { |
| 11 | return reinterpret_cast<unsigned long>(p); |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 12 | } |
Anders Carlsson | 658e812 | 2009-11-14 21:21:42 +0000 | [diff] [blame] | 13 | |
| 14 | void f4(int*&); |
| 15 | void f5(void*& u) { |
| 16 | f4(reinterpret_cast<int*&>(u)); |
| 17 | } |