forked from OSchip/llvm-project
parent
9ebb4d2127
commit
b0e8e228ff
|
@ -139,6 +139,12 @@ bool Sema::LookupInBases(CXXRecordDecl *Class,
|
|||
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.
|
||||
if (BaseType->isDependentType())
|
||||
continue;
|
||||
|
||||
// Determine whether we need to visit this base class at all,
|
||||
// updating the count of subobjects appropriately.
|
||||
std::pair<bool, unsigned>& Subobjects = Paths.ClassSubobjects[BaseType];
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
// RUN: clang-cc -fsyntax-only -verify %s
|
||||
|
||||
typedef double A;
|
||||
template<typename T> class B {
|
||||
typedef int A;
|
||||
};
|
||||
|
||||
template<typename T> struct X : B<T> {
|
||||
static A a;
|
||||
};
|
||||
|
||||
int a0[sizeof(X<int>::a) == sizeof(double) ? 1 : -1];
|
||||
|
||||
// PR4365.
|
||||
template<class T> class Q;
|
||||
template<class T> class R : Q<T> {T current;};
|
Loading…
Reference in New Issue