// RUN: %clang_cc1 -triple i686-mingw32 -ast-dump %s | FileCheck %s template class P { public: P(T* t) {} }; namespace foo { class A { public: A(int = 0) {} }; enum B {}; typedef int C; } // CHECK: VarDecl {{0x[0-9a-fA-F]+}} col:15 ImplicitConstrArray 'foo::A [2]' static foo::A ImplicitConstrArray[2]; int main() { // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} 'foo::A *' P p14 = new foo::A; // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} 'foo::B *' P p24 = new foo::B; // CHECK: CXXNewExpr {{0x[0-9a-fA-F]+}} 'foo::C *' P pr4 = new foo::C; } foo::A getName() { // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} 'foo::A' return foo::A(); } void destruct(foo::A *a1, foo::A *a2, P *p1) { // CHECK: MemberExpr {{0x[0-9a-fA-F]+}} '' ->~A a1->~A(); // CHECK: MemberExpr {{0x[0-9a-fA-F]+}} '' ->~A a2->foo::A::~A(); // CHECK: MemberExpr {{0x[0-9a-fA-F]+}} '' ->~P p1->~P(); } struct D { D(int); ~D(); }; void construct() { using namespace foo; A a = A(12); // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} 'class foo::A' 'void (int){{( __attribute__\(\(thiscall\)\))?}}' D d = D(12); // CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} 'struct D' 'void (int){{( __attribute__\(\(thiscall\)\))?}}' }