Implement a minor optimization by not introducing declarations into
DeclContext's lookup table when they aren't in any identifier namespace. llvm-svn: 131037
This commit is contained in:
parent
b578fbe0f2
commit
0de016dbb7
|
@ -1166,10 +1166,10 @@ void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D) {
|
||||||
if (!D->getDeclName())
|
if (!D->getDeclName())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// FIXME: This feels like a hack. Should DeclarationName support
|
// Skip entities that can't be found by name lookup into a particular
|
||||||
// template-ids, or is there a better way to keep specializations
|
// context.
|
||||||
// from being visible?
|
if ((D->getIdentifierNamespace() == 0 && !isa<UsingDirectiveDecl>(D)) ||
|
||||||
if (isa<ClassTemplateSpecializationDecl>(D) || D->isTemplateParameter())
|
D->isTemplateParameter())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ASTContext *C = 0;
|
ASTContext *C = 0;
|
||||||
|
|
Loading…
Reference in New Issue