Lines Matching refs:OldDecl

6924 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl,  in checkDLLAttributeRedeclaration()  argument
6928 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
6932 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) { in checkDLLAttributeRedeclaration()
6933 OldDecl = OldTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
6943 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
6946 const DLLImportAttr *OldImportAttr = OldDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6947 const DLLExportAttr *OldExportAttr = OldDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
6962 if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) { in checkDLLAttributeRedeclaration()
6965 if (!OldDecl->isCXXClassMember()) { in checkDLLAttributeRedeclaration()
6966 auto *VD = dyn_cast<VarDecl>(OldDecl); in checkDLLAttributeRedeclaration()
6969 auto *FD = dyn_cast<FunctionDecl>(OldDecl); in checkDLLAttributeRedeclaration()
6977 if (OldDecl->isUsed()) in checkDLLAttributeRedeclaration()
6978 if (!isa<FunctionDecl>(OldDecl) || !NewImportAttr) in checkDLLAttributeRedeclaration()
6986 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
7019 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
7027 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
7029 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7035 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
10928 bool &Redeclaration, NamedDecl *&OldDecl, LookupResult &Previous) { in CheckTargetCausesMultiVersioning() argument
10955 OldDecl = OldFD; in CheckTargetCausesMultiVersioning()
10993 OldDecl = nullptr; in CheckTargetCausesMultiVersioning()
11016 const TargetClonesAttr *NewClones, bool &Redeclaration, NamedDecl *&OldDecl, in CheckMultiVersionAdditionalDecl() argument
11060 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
11076 OldDecl = CurFD; in CheckMultiVersionAdditionalDecl()
11110 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
11130 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
11172 OldDecl = OldFD; in CheckMultiVersionAdditionalDecl()
11178 OldDecl = nullptr; in CheckMultiVersionAdditionalDecl()
11190 bool &Redeclaration, NamedDecl *&OldDecl, in CheckMultiVersionFunction() argument
11210 if (!OldDecl || !OldDecl->getAsFunction() || in CheckMultiVersionFunction()
11211 OldDecl->getDeclContext()->getRedeclContext() != in CheckMultiVersionFunction()
11220 FunctionDecl *OldFD = OldDecl->getAsFunction(); in CheckMultiVersionFunction()
11239 Redeclaration, OldDecl, Previous); in CheckMultiVersionFunction()
11259 Redeclaration, OldDecl, Previous); in CheckMultiVersionFunction()
11293 NamedDecl *OldDecl = nullptr; in CheckFunctionDeclaration() local
11307 OldDecl = Candidate; in CheckFunctionDeclaration()
11311 switch (CheckOverload(S, NewFD, Previous, OldDecl, in CheckFunctionDeclaration()
11335 OldDecl = Previous.getFoundDecl(); in CheckFunctionDeclaration()
11339 if (OldDecl->hasAttr<OverloadableAttr>() || in CheckFunctionDeclaration()
11341 if (IsOverload(NewFD, cast<FunctionDecl>(OldDecl), false)) { in CheckFunctionDeclaration()
11344 OldDecl = nullptr; in CheckFunctionDeclaration()
11350 if (CheckMultiVersionFunction(*this, NewFD, Redeclaration, OldDecl, Previous)) in CheckFunctionDeclaration()
11373 if (OldDecl) in CheckFunctionDeclaration()
11374 OldMD = dyn_cast_or_null<CXXMethodDecl>(OldDecl->getAsFunction()); in CheckFunctionDeclaration()
11400 if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious, in CheckFunctionDeclaration()
11407 Previous.addDecl(OldDecl); in CheckFunctionDeclaration()
11410 dyn_cast<FunctionTemplateDecl>(OldDecl)) { in CheckFunctionDeclaration()
11444 if (shouldLinkDependentDeclWithPrevious(NewFD, OldDecl)) { in CheckFunctionDeclaration()
11445 auto *OldFD = cast<FunctionDecl>(OldDecl); in CheckFunctionDeclaration()