blob: bfe87a931b95c9299a3029e519fd42176b2b50ec [file] [log] [blame]
Douglas Gregor940bca72010-04-12 07:48:19 +00001// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s
2
3// This is a wacky test to ensure that we're actually instantiating
Douglas Gregorce3449f2010-09-11 17:51:16 +00004// the default arguments of the constructor when the function type is
Douglas Gregor940bca72010-04-12 07:48:19 +00005// otherwise non-dependent.
6namespace PR6733 {
7 template <class T>
8 class bar {
9 public: enum { kSomeConst = 128 };
10 bar(int x = kSomeConst) {}
11 };
Aaron Ballman8c208282017-12-21 21:42:42 +000012
13 // CHECK: FunctionDecl{{.*}}f 'void ()'
Douglas Gregor940bca72010-04-12 07:48:19 +000014 void f() {
Alexander Kornienko90ff6072012-12-20 02:09:13 +000015 // CHECK: VarDecl{{.*}}tmp 'bar<int>'
Douglas Gregor940bca72010-04-12 07:48:19 +000016 // CHECK: CXXDefaultArgExpr{{.*}}'int'
17 bar<int> tmp;
18 }
19}