Douglas Gregor | cb27b0f | 2010-04-12 07:48:19 +0000 | [diff] [blame] | 1 | // 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 Gregor | c6cb2b0 | 2010-09-11 17:51:16 +0000 | [diff] [blame] | 4 | // the default arguments of the constructor when the function type is |
Douglas Gregor | cb27b0f | 2010-04-12 07:48:19 +0000 | [diff] [blame] | 5 | // otherwise non-dependent. |
| 6 | namespace PR6733 { |
| 7 | template <class T> |
| 8 | class bar { |
| 9 | public: enum { kSomeConst = 128 }; |
| 10 | bar(int x = kSomeConst) {} |
| 11 | }; |
| 12 | |
| 13 | // CHECK: void f() |
| 14 | void f() { |
| 15 | // CHECK: bar<int> tmp = |
| 16 | // CHECK: CXXDefaultArgExpr{{.*}}'int' |
| 17 | bar<int> tmp; |
| 18 | } |
| 19 | } |