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 { |
Nico Weber | 3a344f9 | 2013-01-22 17:00:09 +0000 | [diff] [blame] | 10 | class A { public: A() {} }; |
Nico Weber | 253e80b | 2010-11-22 10:30:56 +0000 | [diff] [blame] | 11 | enum B {}; |
| 12 | typedef int C; |
| 13 | } |
| 14 | |
Nico Weber | 3a344f9 | 2013-01-22 17:00:09 +0000 | [diff] [blame] | 15 | // CHECK: VarDecl {{0x[0-9a-fA-F]+}} <line:16:1, col:36> ImplicitConstrArray 'foo::A [2]' |
| 16 | static foo::A ImplicitConstrArray[2]; |
| 17 | |
Nico Weber | 253e80b | 2010-11-22 10:30:56 +0000 | [diff] [blame] | 18 | int main() { |
Abramo Bagnara | 0daaf32 | 2011-03-16 20:16:18 +0000 | [diff] [blame] | 19 | // 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] | 20 | P<foo::A> p14 = new foo::A; |
Abramo Bagnara | 0daaf32 | 2011-03-16 20:16:18 +0000 | [diff] [blame] | 21 | // 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] | 22 | P<foo::B> p24 = new foo::B; |
| 23 | // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::C *' |
| 24 | P<foo::C> pr4 = new foo::C; |
| 25 | } |
Nico Weber | 76f11c9 | 2010-11-22 13:12:28 +0000 | [diff] [blame] | 26 | |
| 27 | foo::A getName() { |
Abramo Bagnara | 0daaf32 | 2011-03-16 20:16:18 +0000 | [diff] [blame] | 28 | // 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] | 29 | return foo::A(); |
| 30 | } |