Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o - %s -std=c++11 |
NAKAMURA Takumi | b774d73 | 2012-09-12 10:45:40 +0000 | [diff] [blame] | 2 | // REQUIRES: LP64 |
| 3 | |
Anders Carlsson | 7f9e646 | 2009-09-15 04:48:33 +0000 | [diff] [blame] | 4 | void *f1(unsigned long l) { |
| 5 | return reinterpret_cast<void *>(l); |
| 6 | } |
| 7 | |
| 8 | unsigned long f2() { |
| 9 | return reinterpret_cast<unsigned long>(nullptr); |
| 10 | } |
| 11 | |
| 12 | unsigned long f3(void *p) { |
| 13 | return reinterpret_cast<unsigned long>(p); |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 14 | } |
Anders Carlsson | 658e812 | 2009-11-14 21:21:42 +0000 | [diff] [blame] | 15 | |
| 16 | void f4(int*&); |
| 17 | void f5(void*& u) { |
| 18 | f4(reinterpret_cast<int*&>(u)); |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 19 | } |