blob: 0537aa20d5e92425c2758c48f3675b2930d96099 [file] [log] [blame]
Nico Weber253e80b2010-11-22 10:30:56 +00001// RUN: %clang_cc1 -ast-dump %s | FileCheck %s
2
3template<class T>
4class P {
5 public:
6 P(T* t) {}
7};
8
9namespace foo {
10class A {};
11enum B {};
12typedef int C;
13}
14
15int main() {
Abramo Bagnara0daaf322011-03-16 20:16:18 +000016 // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::A *'
Nico Weber253e80b2010-11-22 10:30:56 +000017 P<foo::A> p14 = new foo::A;
Abramo Bagnara0daaf322011-03-16 20:16:18 +000018 // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} <col:19, col:28> 'foo::B *'
Nico Weber253e80b2010-11-22 10:30:56 +000019 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 Weber76f11c92010-11-22 13:12:28 +000023
24foo::A getName() {
Abramo Bagnara0daaf322011-03-16 20:16:18 +000025 // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} <col:10, col:17> 'foo::A'
Nico Weber76f11c92010-11-22 13:12:28 +000026 return foo::A();
27}