1940bca7bSDouglas Gregor // RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s 2940bca7bSDouglas Gregor 3940bca7bSDouglas Gregor // This is a wacky test to ensure that we're actually instantiating 4ce3449f5SDouglas Gregor // the default arguments of the constructor when the function type is 5940bca7bSDouglas Gregor // otherwise non-dependent. 6940bca7bSDouglas Gregor namespace PR6733 { 7940bca7bSDouglas Gregor template <class T> 8940bca7bSDouglas Gregor class bar { 9940bca7bSDouglas Gregor public: enum { kSomeConst = 128 }; bar(int x=kSomeConst)10940bca7bSDouglas Gregor bar(int x = kSomeConst) {} 11940bca7bSDouglas Gregor }; 12940bca7bSDouglas Gregor 13*8c20828bSAaron Ballman // CHECK: FunctionDecl{{.*}}f 'void ()' f()14940bca7bSDouglas Gregor void f() { 1590ff6078SAlexander Kornienko // CHECK: VarDecl{{.*}}tmp 'bar<int>' 16940bca7bSDouglas Gregor // CHECK: CXXDefaultArgExpr{{.*}}'int' 17940bca7bSDouglas Gregor bar<int> tmp; 18940bca7bSDouglas Gregor } 19940bca7bSDouglas Gregor } 20