Lines Matching refs:OldDecl
6483 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, in checkDLLAttributeRedeclaration() argument
6487 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
6491 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) { in checkDLLAttributeRedeclaration()
6492 OldDecl = OldTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
6502 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
6505 const DLLImportAttr *OldImportAttr = OldDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6506 const DLLExportAttr *OldExportAttr = OldDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
6521 if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) { in checkDLLAttributeRedeclaration()
6524 if (!OldDecl->isCXXClassMember()) { in checkDLLAttributeRedeclaration()
6525 auto *VD = dyn_cast<VarDecl>(OldDecl); in checkDLLAttributeRedeclaration()
6528 auto *FD = dyn_cast<FunctionDecl>(OldDecl); in checkDLLAttributeRedeclaration()
6536 if (OldDecl->isUsed()) in checkDLLAttributeRedeclaration()
6537 if (!isa<FunctionDecl>(OldDecl) || !NewImportAttr) in checkDLLAttributeRedeclaration()
6545 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6578 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6586 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6588 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6594 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
10421 bool &Redeclaration, NamedDecl *&OldDecl, bool &MergeTypeWithPrevious, in CheckTargetCausesMultiVersioning() argument
10456 OldDecl = OldFD; in CheckTargetCausesMultiVersioning()
10495 OldDecl = nullptr; in CheckTargetCausesMultiVersioning()
10506 bool &Redeclaration, NamedDecl *&OldDecl, bool &MergeTypeWithPrevious, in CheckMultiVersionAdditionalDecl() argument
10544 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
10572 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
10593 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
10635 OldDecl = OldFD; in CheckMultiVersionAdditionalDecl()
10642 OldDecl = nullptr; in CheckMultiVersionAdditionalDecl()
10655 bool &Redeclaration, NamedDecl *&OldDecl, in CheckMultiVersionFunction() argument
10685 if (!OldDecl || !OldDecl->getAsFunction() || in CheckMultiVersionFunction()
10686 OldDecl->getDeclContext()->getRedeclContext() != in CheckMultiVersionFunction()
10695 FunctionDecl *OldFD = OldDecl->getAsFunction(); in CheckMultiVersionFunction()
10710 Redeclaration, OldDecl, in CheckMultiVersionFunction()
10718 OldDecl, MergeTypeWithPrevious, Previous); in CheckMultiVersionFunction()
10751 NamedDecl *OldDecl = nullptr; in CheckFunctionDeclaration() local
10765 OldDecl = Candidate; in CheckFunctionDeclaration()
10769 switch (CheckOverload(S, NewFD, Previous, OldDecl, in CheckFunctionDeclaration()
10793 OldDecl = Previous.getFoundDecl(); in CheckFunctionDeclaration()
10797 if (OldDecl->hasAttr<OverloadableAttr>() || in CheckFunctionDeclaration()
10799 if (IsOverload(NewFD, cast<FunctionDecl>(OldDecl), false)) { in CheckFunctionDeclaration()
10802 OldDecl = nullptr; in CheckFunctionDeclaration()
10808 if (CheckMultiVersionFunction(*this, NewFD, Redeclaration, OldDecl, in CheckFunctionDeclaration()
10832 if (OldDecl) in CheckFunctionDeclaration()
10833 OldMD = dyn_cast_or_null<CXXMethodDecl>(OldDecl->getAsFunction()); in CheckFunctionDeclaration()
10859 if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious)) { in CheckFunctionDeclaration()
10865 Previous.addDecl(OldDecl); in CheckFunctionDeclaration()
10868 dyn_cast<FunctionTemplateDecl>(OldDecl)) { in CheckFunctionDeclaration()
10902 if (shouldLinkDependentDeclWithPrevious(NewFD, OldDecl)) { in CheckFunctionDeclaration()
10903 auto *OldFD = cast<FunctionDecl>(OldDecl); in CheckFunctionDeclaration()