Lines Matching defs:Shadow
7262 /// Determines whether to create a using shadow decl for a particular
7269 // function will silently decide not to build a shadow decl, which
7285 // The right solution is to not collapse the shadow-decl chain.
7331 if (UsingShadowDecl *Shadow = dyn_cast<UsingShadowDecl>(*I))
7332 PrevShadow = Shadow;
7357 // build a shadow decl.
7392 /// Builds a shadow declaration corresponding to a 'using' declaration.
7398 // If we resolved to another shadow declaration, just coalesce them.
7402 assert(!isa<UsingShadowDecl>(Target) && "nested shadow declaration");
7405 UsingShadowDecl *Shadow
7408 UD->addShadowDecl(Shadow);
7410 Shadow->setAccess(UD->getAccess());
7412 Shadow->setInvalidDecl();
7414 Shadow->setPreviousDecl(PrevDecl);
7417 PushOnScopeChains(Shadow, S);
7419 CurContext->addDecl(Shadow);
7422 return Shadow;
7425 /// Hides a using shadow declaration. This is required by the current
7444 /// (1) optimistically create shadow decls when they're not hidden
7446 /// (2) don't create any shadow decls (or at least don't make them
7449 /// a shadow decl, which requires several O(n) operations because the
7452 void Sema::HideUsingShadowDecl(Scope *S, UsingShadowDecl *Shadow) {
7453 if (Shadow->getDeclName().getNameKind() ==
7455 cast<CXXRecordDecl>(Shadow->getDeclContext())->removeConversion(Shadow);
7458 Shadow->getDeclContext()->removeDecl(Shadow);
7462 S->RemoveDecl(Shadow);
7463 IdResolver.RemoveDecl(Shadow);
7467 Shadow->getUsingDecl()->removeShadowDecl(Shadow);
7469 // TODO: complain somehow if Shadow was used. It shouldn't