Nico Weber | 253e80b | 2010-11-22 10:30:56 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -ast-dump %s | FileCheck %s |
| 2 | |
| 3 | template<class T> |
| 4 | class P { |
| 5 | public: |
| 6 | P(T* t) {} |
| 7 | }; |
| 8 | |
| 9 | namespace foo { |
| 10 | class A {}; |
| 11 | enum B {}; |
| 12 | typedef int C; |
| 13 | } |
| 14 | |
| 15 | int main() { |
Abramo Bagnara | 0daaf32 | 2011-03-16 20:16:18 +0000 | [diff] [blame] | 16 | // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::A *' |
Nico Weber | 253e80b | 2010-11-22 10:30:56 +0000 | [diff] [blame] | 17 | P<foo::A> p14 = new foo::A; |
Abramo Bagnara | 0daaf32 | 2011-03-16 20:16:18 +0000 | [diff] [blame] | 18 | // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::B *' |
Nico Weber | 253e80b | 2010-11-22 10:30:56 +0000 | [diff] [blame] | 19 | P<foo::B> p24 = new foo::B; |
| 20 | // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::C *' |
| 21 | P<foo::C> pr4 = new foo::C; |
| 22 | } |
Nico Weber | 76f11c9 | 2010-11-22 13:12:28 +0000 | [diff] [blame] | 23 | |
| 24 | foo::A getName() { |
Abramo Bagnara | 0daaf32 | 2011-03-16 20:16:18 +0000 | [diff] [blame] | 25 | // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} <col:10, col:17> 'foo::A' |
Nico Weber | 76f11c9 | 2010-11-22 13:12:28 +0000 | [diff] [blame] | 26 | return foo::A(); |
| 27 | } |