Lines Matching refs:OldDecl
6550 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, in checkDLLAttributeRedeclaration() argument
6554 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
6558 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) { in checkDLLAttributeRedeclaration()
6559 OldDecl = OldTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
6569 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
6572 const DLLImportAttr *OldImportAttr = OldDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6573 const DLLExportAttr *OldExportAttr = OldDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
6588 if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) { in checkDLLAttributeRedeclaration()
6591 if (!OldDecl->isCXXClassMember()) { in checkDLLAttributeRedeclaration()
6592 auto *VD = dyn_cast<VarDecl>(OldDecl); in checkDLLAttributeRedeclaration()
6595 auto *FD = dyn_cast<FunctionDecl>(OldDecl); in checkDLLAttributeRedeclaration()
6603 if (OldDecl->isUsed()) in checkDLLAttributeRedeclaration()
6604 if (!isa<FunctionDecl>(OldDecl) || !NewImportAttr) in checkDLLAttributeRedeclaration()
6612 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6645 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6653 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6655 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6661 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
10480 bool &Redeclaration, NamedDecl *&OldDecl, bool &MergeTypeWithPrevious, in CheckTargetCausesMultiVersioning() argument
10515 OldDecl = OldFD; in CheckTargetCausesMultiVersioning()
10554 OldDecl = nullptr; in CheckTargetCausesMultiVersioning()
10565 bool &Redeclaration, NamedDecl *&OldDecl, bool &MergeTypeWithPrevious, in CheckMultiVersionAdditionalDecl() argument
10603 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
10631 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
10652 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
10694 OldDecl = OldFD; in CheckMultiVersionAdditionalDecl()
10701 OldDecl = nullptr; in CheckMultiVersionAdditionalDecl()
10714 bool &Redeclaration, NamedDecl *&OldDecl, in CheckMultiVersionFunction() argument
10744 if (!OldDecl || !OldDecl->getAsFunction() || in CheckMultiVersionFunction()
10745 OldDecl->getDeclContext()->getRedeclContext() != in CheckMultiVersionFunction()
10754 FunctionDecl *OldFD = OldDecl->getAsFunction(); in CheckMultiVersionFunction()
10769 Redeclaration, OldDecl, in CheckMultiVersionFunction()
10777 OldDecl, MergeTypeWithPrevious, Previous); in CheckMultiVersionFunction()
10810 NamedDecl *OldDecl = nullptr; in CheckFunctionDeclaration() local
10824 OldDecl = Candidate; in CheckFunctionDeclaration()
10828 switch (CheckOverload(S, NewFD, Previous, OldDecl, in CheckFunctionDeclaration()
10852 OldDecl = Previous.getFoundDecl(); in CheckFunctionDeclaration()
10856 if (OldDecl->hasAttr<OverloadableAttr>() || in CheckFunctionDeclaration()
10858 if (IsOverload(NewFD, cast<FunctionDecl>(OldDecl), false)) { in CheckFunctionDeclaration()
10861 OldDecl = nullptr; in CheckFunctionDeclaration()
10867 if (CheckMultiVersionFunction(*this, NewFD, Redeclaration, OldDecl, in CheckFunctionDeclaration()
10891 if (OldDecl) in CheckFunctionDeclaration()
10892 OldMD = dyn_cast_or_null<CXXMethodDecl>(OldDecl->getAsFunction()); in CheckFunctionDeclaration()
10918 if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious)) { in CheckFunctionDeclaration()
10924 Previous.addDecl(OldDecl); in CheckFunctionDeclaration()
10927 dyn_cast<FunctionTemplateDecl>(OldDecl)) { in CheckFunctionDeclaration()
10961 if (shouldLinkDependentDeclWithPrevious(NewFD, OldDecl)) { in CheckFunctionDeclaration()
10962 auto *OldFD = cast<FunctionDecl>(OldDecl); in CheckFunctionDeclaration()