diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-25 13:46:13 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-25 13:46:13 +0000 |
commit | 5653ca5088b799ada71b5043a0a2cd71c727da83 (patch) | |
tree | 994a2da6c69fad46b091a7cdbc3b19513bea5dd4 /test/SemaTemplate/default-expr-arguments.cpp | |
parent | 293361afd4199c92aabff9267fddea890943c586 (diff) |
If a parameter has a default argument expression, make sure to instantiate the parameter type before checking that the expression is a valid initializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r-- | test/SemaTemplate/default-expr-arguments.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp index 34d2d9d6fe..7c813c9852 100644 --- a/test/SemaTemplate/default-expr-arguments.cpp +++ b/test/SemaTemplate/default-expr-arguments.cpp @@ -26,3 +26,11 @@ template<typename T> struct F { void g2() { F<int> f; } + +template<typename T> struct G { + G(T) {} +}; + +void s(G<int> flags = 10) { } + + |