Lines Matching refs:OldDecl
6004 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, in checkDLLAttributeRedeclaration() argument
6008 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
6012 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) { in checkDLLAttributeRedeclaration()
6013 OldDecl = OldTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
6023 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
6026 const DLLImportAttr *OldImportAttr = OldDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6027 const DLLExportAttr *OldExportAttr = OldDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
6042 if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) { in checkDLLAttributeRedeclaration()
6045 if (!OldDecl->isCXXClassMember()) { in checkDLLAttributeRedeclaration()
6046 auto *VD = dyn_cast<VarDecl>(OldDecl); in checkDLLAttributeRedeclaration()
6049 auto *FD = dyn_cast<FunctionDecl>(OldDecl); in checkDLLAttributeRedeclaration()
6057 if (OldDecl->isUsed()) in checkDLLAttributeRedeclaration()
6058 if (!isa<FunctionDecl>(OldDecl) || !NewImportAttr) in checkDLLAttributeRedeclaration()
6066 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6099 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6108 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
6110 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6116 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
9614 bool &Redeclaration, NamedDecl *&OldDecl, bool &MergeTypeWithPrevious, in CheckTargetCausesMultiVersioning() argument
9649 OldDecl = OldFD; in CheckTargetCausesMultiVersioning()
9689 OldDecl = nullptr; in CheckTargetCausesMultiVersioning()
9700 bool &Redeclaration, NamedDecl *&OldDecl, bool &MergeTypeWithPrevious, in CheckMultiVersionAdditionalDecl() argument
9738 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
9767 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
9788 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
9830 OldDecl = OldFD; in CheckMultiVersionAdditionalDecl()
9837 OldDecl = nullptr; in CheckMultiVersionAdditionalDecl()
9850 bool &Redeclaration, NamedDecl *&OldDecl, in CheckMultiVersionFunction() argument
9880 if (!OldDecl || !OldDecl->getAsFunction() || in CheckMultiVersionFunction()
9881 OldDecl->getDeclContext()->getRedeclContext() != in CheckMultiVersionFunction()
9891 FunctionDecl *OldFD = OldDecl->getAsFunction(); in CheckMultiVersionFunction()
9906 Redeclaration, OldDecl, in CheckMultiVersionFunction()
9914 OldDecl, MergeTypeWithPrevious, Previous); in CheckMultiVersionFunction()
9947 NamedDecl *OldDecl = nullptr; in CheckFunctionDeclaration() local
9961 OldDecl = Candidate; in CheckFunctionDeclaration()
9965 switch (CheckOverload(S, NewFD, Previous, OldDecl, in CheckFunctionDeclaration()
9989 OldDecl = Previous.getFoundDecl(); in CheckFunctionDeclaration()
9993 if (OldDecl->hasAttr<OverloadableAttr>() || in CheckFunctionDeclaration()
9995 if (IsOverload(NewFD, cast<FunctionDecl>(OldDecl), false)) { in CheckFunctionDeclaration()
9998 OldDecl = nullptr; in CheckFunctionDeclaration()
10004 if (CheckMultiVersionFunction(*this, NewFD, Redeclaration, OldDecl, in CheckFunctionDeclaration()
10022 if (OldDecl) in CheckFunctionDeclaration()
10023 OldMD = dyn_cast_or_null<CXXMethodDecl>(OldDecl->getAsFunction()); in CheckFunctionDeclaration()
10049 if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious)) { in CheckFunctionDeclaration()
10055 Previous.addDecl(OldDecl); in CheckFunctionDeclaration()
10058 dyn_cast<FunctionTemplateDecl>(OldDecl)) { in CheckFunctionDeclaration()
10093 if (shouldLinkDependentDeclWithPrevious(NewFD, OldDecl)) { in CheckFunctionDeclaration()
10094 auto *OldFD = cast<FunctionDecl>(OldDecl); in CheckFunctionDeclaration()