When performing name lookup within a class template or class template
partial specialization, make sure we look into non-dependent base
classes (but not dependent base classes). Fixes PR4951.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81584 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaInherit.cpp b/lib/Sema/SemaInherit.cpp
index e6734d5..01e856c 100644
--- a/lib/Sema/SemaInherit.cpp
+++ b/lib/Sema/SemaInherit.cpp
@@ -139,9 +139,12 @@
     QualType BaseType = Context.getCanonicalType(BaseSpec->getType());
     BaseType = BaseType.getUnqualifiedType();
 
-    // If a base class of the class template depends on a template-parameter,
-    // the base class scope is not examined during unqualified name lookup.
-    // [temp.dep]p3.
+    // C++ [temp.dep]p3:
+    //   In the definition of a class template or a member of a class template,
+    //   if a base class of the class template depends on a template-parameter,
+    //   the base class scope is not examined during unqualified name lookup 
+    //   either at the point of definition of the class template or member or 
+    //   during an instantiation of the class tem- plate or member.
     if (BaseType->isDependentType())
       continue;