When instantiating UnresolvedLookupExpr and UnresolvedMemberExpr
expressions, be sure to set the naming class of the LookupResult
structure. Fixes PR6947.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102434 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-method.cpp b/test/SemaTemplate/instantiate-method.cpp
index 3ef07d3..c0325cf 100644
--- a/test/SemaTemplate/instantiate-method.cpp
+++ b/test/SemaTemplate/instantiate-method.cpp
@@ -127,3 +127,28 @@
};
template class B<int>;
}
+
+namespace PR6947 {
+ template< class T >
+ struct X {
+ int f0( )
+ {
+ typedef void ( X::*impl_fun_ptr )( );
+ impl_fun_ptr pImpl = &X::template
+ f0_impl1<int>;
+ }
+ private:
+ int f1() {
+ }
+ template< class Processor>
+ void f0_impl1( )
+ {
+ }
+ };
+
+ char g0() {
+ X<int> pc;
+ pc.f0();
+ }
+
+}