Lines Matching defs:OldDecl
6949 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl,
6953 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl())
6957 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) {
6958 OldDecl = OldTD->getTemplatedDecl();
6968 if (!OldDecl || !NewDecl)
6971 const DLLImportAttr *OldImportAttr = OldDecl->getAttr<DLLImportAttr>();
6972 const DLLExportAttr *OldExportAttr = OldDecl->getAttr<DLLExportAttr>();
6987 if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) {
6990 if (!OldDecl->isCXXClassMember()) {
6991 auto *VD = dyn_cast<VarDecl>(OldDecl);
6994 auto *FD = dyn_cast<FunctionDecl>(OldDecl);
7002 if (OldDecl->isUsed())
7003 if (!isa<FunctionDecl>(OldDecl) || !NewImportAttr)
7011 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration);
7051 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration);
7063 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration);
7065 OldDecl->dropAttr<DLLImportAttr>();
7071 OldDecl->dropAttr<DLLImportAttr>();
11299 NamedDecl *&OldDecl,
11339 OldDecl = OldFD;
11388 OldDecl = nullptr;
11427 const TargetClonesAttr *NewClones, bool &Redeclaration, NamedDecl *&OldDecl,
11485 OldDecl = ND;
11506 OldDecl = ND;
11575 OldDecl = CurFD;
11597 OldDecl = ND;
11617 OldDecl = ND;
11660 OldDecl = OldFD;
11666 OldDecl = nullptr;
11678 bool &Redeclaration, NamedDecl *&OldDecl,
11712 if (!OldDecl || !OldDecl->getAsFunction() ||
11713 !OldDecl->getDeclContext()->getRedeclContext()->Equals(
11722 FunctionDecl *OldFD = OldDecl->getAsFunction();
11743 S, OldFD, NewFD, Redeclaration, OldDecl, Previous);
11764 OldDecl, Previous);
11807 NamedDecl *OldDecl = nullptr;
11821 OldDecl = Candidate;
11825 switch (CheckOverload(S, NewFD, Previous, OldDecl,
11849 OldDecl = Previous.getFoundDecl();
11853 if (OldDecl->hasAttr<OverloadableAttr>() ||
11855 if (IsOverload(NewFD, cast<FunctionDecl>(OldDecl), false)) {
11858 OldDecl = nullptr;
11864 if (CheckMultiVersionFunction(*this, NewFD, Redeclaration, OldDecl, Previous))
11918 if (OldDecl)
11919 OldMD = dyn_cast_or_null<CXXMethodDecl>(OldDecl->getAsFunction());
11943 // NewFD and OldDecl represent declarations that need to be
11945 if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious,
11952 Previous.addDecl(OldDecl);
11955 dyn_cast<FunctionTemplateDecl>(OldDecl)) {
11989 if (shouldLinkDependentDeclWithPrevious(NewFD, OldDecl)) {
11990 auto *OldFD = cast<FunctionDecl>(OldDecl);