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