Anders Carlsson | ed4e367 | 2009-05-31 20:21:44 +0000 | [diff] [blame] | 1 | // RUN: clang-cc %s -emit-llvm -o %t |
| 2 | |
| 3 | void t1() { |
| 4 | int* a = new int; |
| 5 | } |
Anders Carlsson | d958389 | 2009-05-31 20:26:12 +0000 | [diff] [blame] | 6 | |
| 7 | // Placement. |
| 8 | void* operator new(unsigned long, void*) throw(); |
| 9 | |
| 10 | void t2(int* a) { |
| 11 | int* b = new (a) int; |
| 12 | } |
Anders Carlsson | 6d0ffad | 2009-05-31 20:56:36 +0000 | [diff] [blame] | 13 | |
| 14 | void t3() { |
| 15 | int *a = new int(10); |
Anders Carlsson | 3923e95 | 2009-05-31 21:07:58 +0000 | [diff] [blame^] | 16 | _Complex int* b = new _Complex int(10i); |
| 17 | |
Anders Carlsson | 6d0ffad | 2009-05-31 20:56:36 +0000 | [diff] [blame] | 18 | } |