Implement support for default template arguments of function templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89874 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/default-arguments-cxx0x.cpp b/test/SemaTemplate/default-arguments-cxx0x.cpp
new file mode 100644
index 0000000..8d8833c
--- /dev/null
+++ b/test/SemaTemplate/default-arguments-cxx0x.cpp
@@ -0,0 +1,26 @@
+// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s
+
+// Test default template arguments for function templates.
+template<typename T = int>
+void f0();
+
+template<typename T>
+void f0();
+
+void g0() {
+  f0(); // okay!
+} 
+
+template<typename T, int N = T::value>
+int &f1(T);
+
+float &f1(...);
+
+struct HasValue {
+  static const int value = 17;
+};
+
+void g1() {
+  float &fr = f1(15);
+  int &ir = f1(HasValue());
+}