Lines Matching defs:ND

79     if (NamedDecl *ND = candidate.getCorrectionDecl()) {
80 if (!AllowInvalidDecl && ND->isInvalidDecl())
83 if (getAsTypeTemplateDecl(ND))
86 bool IsType = isa<TypeDecl>(ND) || isa<ObjCInterfaceDecl>(ND);
96 auto *RD = dyn_cast<CXXRecordDecl>(ND);
212 for (NamedDecl *ND : BaseRD->lookup(&II)) {
213 if (!isa<TypeDecl>(ND))
529 auto *ND = dyn_cast<NamespaceDecl>(DC);
530 if (ND && !ND->isInline() && !ND->isAnonymousNamespace())
531 return NestedNameSpecifier::Create(Context, nullptr, ND);
5879 Sema::RegisterLocallyScopedExternCDecl(NamedDecl *ND, Scope *S) {
5881 ND->getLexicalDeclContext()->getRedeclContext()->isTranslationUnit())
5886 Context.getExternCContextDecl()->makeDeclVisibleInContext(ND);
5955 NamedDecl *ND = ActOnTypedefNameDecl(S, DC, NewTD, Previous, Redeclaration);
5957 return ND;
6182 static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) {
6185 assert(S.ParsingInitForAutoVars.count(&ND) == 0);
6188 if (WeakAttr *Attr = ND.getAttr<WeakAttr>()) {
6189 if (!ND.isExternallyVisible()) {
6191 ND.dropAttr<WeakAttr>();
6194 if (WeakRefAttr *Attr = ND.getAttr<WeakRefAttr>()) {
6195 if (ND.isExternallyVisible()) {
6197 ND.dropAttr<WeakRefAttr>();
6198 ND.dropAttr<AliasAttr>();
6202 if (auto *VD = dyn_cast<VarDecl>(&ND)) {
6215 if (SelectAnyAttr *Attr = ND.getAttr<SelectAnyAttr>()) {
6216 if (isa<FunctionDecl>(ND) || !ND.isExternallyVisible()) {
6219 ND.dropAttr<SelectAnyAttr>();
6223 if (const InheritableAttr *Attr = getDLLAttr(&ND)) {
6224 auto *VD = dyn_cast<VarDecl>(&ND);
6239 if ((ND.isExternallyVisible() && AnonNSInMicrosoftMode) ||
6241 (!ND.isExternallyVisible() || (VD && VD->isStaticLocal())))) {
6242 S.Diag(ND.getLocation(), diag::err_attribute_dll_not_extern)
6243 << &ND << Attr;
6244 ND.setInvalidDecl();
6249 if (auto *Attr = ND.getAttr<NotTailCalledAttr>())
6250 if (auto *MD = dyn_cast<CXXMethodDecl>(&ND))
6252 S.Diag(ND.getLocation(),
6255 ND.dropAttr<NotTailCalledAttr>();
6259 if (const auto *FD = dyn_cast<FunctionDecl>(&ND)) {
7503 Sema &S, const T *ND, bool IsGlobal, LookupResult &Previous) {
7505 NamedDecl *Prev = S.findLocallyScopedExternCDecl(ND->getDeclName());
7507 if (!Prev && IsGlobal && !isIncompleteDeclExternC(S, ND)) {
7514 if (!IsGlobal || isIncompleteDeclExternC(S, ND)) {
7525 if (!isa<VarDecl>(ND))
7542 S.Context.getTranslationUnitDecl()->lookup(ND->getDeclName());
7569 S.Diag(ND->getLocation(), diag::err_extern_c_global_conflict)
7570 << IsGlobal << ND;
7585 static bool checkForConflictWithNonVisibleExternC(Sema &S, const T *ND,
7591 if (ND->getDeclContext()->getRedeclContext()->isTranslationUnit()) {
7592 if (NamedDecl *Prev = S.findLocallyScopedExternCDecl(ND->getDeclName())) {
7603 if (ND->getDeclContext()->getRedeclContext()->isTranslationUnit())
7604 return checkGlobalOrExternCConflict(S, ND, /*IsGlobal*/true, Previous);
7609 if (isIncompleteDeclExternC(S,ND))
7610 return checkGlobalOrExternCConflict(S, ND, /*IsGlobal*/false, Previous);
10162 for (NamedDecl *ND : Previous) {
10163 FunctionDecl *CurFD = ND->getAsFunction();
10174 OldDecl = ND;
10202 OldDecl = ND;
10223 OldDecl = ND;
10540 [](const NamedDecl *ND) {
10541 return ND->hasAttr<OverloadableAttr>();
10545 auto OtherUnmarkedIter = llvm::find_if(Previous, [](const NamedDecl *ND) {
10546 const auto *FD = dyn_cast<FunctionDecl>(ND);
14784 static FixItHint createFriendTagNNSFixIt(Sema &SemaRef, NamedDecl *ND, Scope *S,
14790 DeclContext *DC = ND->getDeclContext()->getRedeclContext();
15083 NamedDecl *ND = F.next();
15084 if (!ND->getDeclContext()->getRedeclContext()->Equals(
15109 NamedDecl *ND = F.next();
15110 DeclContext *DC = ND->getDeclContext()->getRedeclContext();
15112 !EnclosingNS->Encloses(ND->getDeclContext())) {
15124 NamedDecl *ND = Previous.getFoundDecl();
15126 << createFriendTagNNSFixIt(*this, ND, S, NameLoc);
17798 if (NamedDecl *ND = dyn_cast<NamedDecl>(PrevDecl))
17799 DeclApplyPragmaWeak(TUScope, ND, W);