Make sure to adjust function template declarations to their templated
declarations (e.g., FunctionTemplateDecl -> CXXConstructorDecl) before
performing semantic analysis on the declarations. Fixes PR4761.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79911 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/constructor-template.cpp b/test/SemaTemplate/constructor-template.cpp
index 14df2e2..5a2630c 100644
--- a/test/SemaTemplate/constructor-template.cpp
+++ b/test/SemaTemplate/constructor-template.cpp
@@ -4,6 +4,10 @@
   X0(int); // expected-note{{candidate}}
   template<typename T> X0(T);
   template<typename T, typename U> X0(T*, U*);
+  
+  // PR4761
+  template<typename T> X0() : f0(T::foo) {}
+  int f0;
 };
 
 void accept_X0(X0);