Lines Matching defs:ND
1334 if (NamedDecl *ND = R.getAcceptableDecl(*I)) {
1356 R.addDecl(ND);
1398 if (NamedDecl *ND = R.getAcceptableDecl(Ivar)) {
1399 R.addDecl(ND);
1487 if (NamedDecl *ND = R.getAcceptableDecl(*I)) {
1493 R.addDecl(ND);
1541 void Sema::makeMergedDefinitionVisible(NamedDecl *ND) {
1543 Context.mergeDefinitionIntoModule(ND, M);
1546 ND->setVisibleDespiteOwningModule();
1548 // If ND is a template declaration, make the template parameters
1550 if (auto *TD = dyn_cast<TemplateDecl>(ND))
2048 auto ND = cast<NamedDecl>(RD);
2052 if (ND->isInIdentifierNamespace(IDNS) &&
2053 LookupResult::isAvailableForLookup(SemaRef, ND))
2054 return ND;
2077 if (auto *ND = dyn_cast<NamespaceDecl>(D)) {
2084 auto *Key = ND->getCanonicalDecl();
2115 bool LookupResult::isAvailableForLookup(Sema &SemaRef, NamedDecl *ND) {
2117 if (isVisible(SemaRef, ND))
2124 if (auto *DeductionGuide = ND->getDeclName().getCXXDeductionGuideTemplate())
2139 if (auto *FD = dyn_cast<FunctionDecl>(ND);
2143 auto *DC = ND->getDeclContext();
2144 // If ND is not visible and it is at namespace scope, it shouldn't be found
2328 NamespaceDecl *ND = I->getNominatedNamespace()->getFirstDecl();
2329 if (S.isVisible(I) && Visited.insert(ND).second)
2330 Queue.push_back(ND);
2344 NamespaceDecl *ND = Queue.pop_back_val();
2350 bool FoundDirect = LookupDirect(S, DirectR, ND);
2375 for (auto *I : ND->using_directives()) {
2541 NamedDecl *ND = *It++;
2542 if (!ND->isInIdentifierNamespace(IDNS))
2554 if (auto *TD = getAsTemplateNameDecl(ND))
2555 ND = TD;
2560 if (const TypeDecl *TD = dyn_cast<TypeDecl>(ND->getUnderlyingDecl())) {
2565 return ND->getUnderlyingDecl()->getCanonicalDecl();
2659 if (NamedDecl *ND = R.getAcceptableDecl(*I))
2660 R.addDecl(ND, AS);
3942 NamedDecl *checkHidden(NamedDecl *ND);
3945 void add(NamedDecl *ND) {
3946 ShadowMaps.back()[ND->getDeclName()].push_back(ND);
3968 NamedDecl *VisibleDeclsRecord::checkHidden(NamedDecl *ND) {
3969 unsigned IDNS = ND->getIdentifierNamespace();
3973 ShadowMap::iterator Pos = SM->find(ND->getDeclName());
3994 ND->getUnderlyingDecl()->isFunctionOrFunctionTemplate() &&
4000 if (isa<UsingShadowDecl>(ND) && isa<UsingDecl>(D) &&
4001 cast<UsingShadowDecl>(ND)->getIntroducer() == D)
4090 if (NamedDecl *ND = Result.getAcceptableDecl(*I)) {
4091 Consumer.FoundDecl(ND, Visited.checkHidden(ND), Ctx, InBaseClass);
4092 Visited.add(ND);
4113 // Rather than visit immediately, we put ND into a vector and visit
4121 if (auto *ND = Result.getAcceptableDecl(D)) {
4122 Consumer.FoundDecl(ND, Visited.checkHidden(ND), Ctx, InBaseClass);
4123 Visited.add(ND);
4265 if (NamedDecl *ND = dyn_cast<NamedDecl>(D))
4266 if ((ND = Result.getAcceptableDecl(ND))) {
4267 Consumer.FoundDecl(ND, Visited.checkHidden(ND), nullptr, false);
4268 Visited.add(ND);
4491 void TypoCorrectionConsumer::FoundDecl(NamedDecl *ND, NamedDecl *Hiding,
4500 IdentifierInfo *Name = ND->getIdentifier();
4506 if (!LookupResult::isVisible(SemaRef, ND) && Name != Typo)
4524 void TypoCorrectionConsumer::addName(StringRef Name, NamedDecl *ND,
4539 TypoCorrection TC(&SemaRef.Context.Idents.get(Name), ND, NNS, ED);
4809 if (auto *ND = dyn_cast_or_null<NamespaceDecl>(C))
4810 CurContextIdentifiers.push_back(ND->getIdentifier());
4825 NamespaceDecl *ND = dyn_cast_or_null<NamespaceDecl>(DC);
4827 !(ND && ND->isAnonymousNamespace()))
4838 if (auto *ND = dyn_cast_or_null<NamespaceDecl>(C)) {
4839 NNS = NestedNameSpecifier::Create(Context, NNS, ND);
4873 } else if (NamedDecl *ND =
4875 IdentifierInfo *Name = ND->getIdentifier();
5466 NamedDecl *ND = C->getUnderlyingDecl();
5467 if (FunctionTemplateDecl *FTD = dyn_cast<FunctionTemplateDecl>(ND))
5470 if (!(FD = dyn_cast<FunctionDecl>(ND)) && isa<ValueDecl>(ND)) {
5474 QualType ValType = cast<ValueDecl>(ND)->getType();
5486 if ((HasExplicitTemplateArgs ? getAsTypeTemplateDecl(ND) != nullptr
5487 : isa<TypeDecl>(ND)) &&
5490 return NumArgs <= 1 || HasExplicitTemplateArgs || isa<CXXRecordDecl>(ND);