Lines Matching refs:OldDecl

5594 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl,  in checkDLLAttributeRedeclaration()  argument
5598 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) { in checkDLLAttributeRedeclaration()
5599 OldDecl = OldTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
5606 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
5609 const DLLImportAttr *OldImportAttr = OldDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
5610 const DLLExportAttr *OldExportAttr = OldDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
5625 if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) { in checkDLLAttributeRedeclaration()
5628 if (!OldDecl->isCXXClassMember()) { in checkDLLAttributeRedeclaration()
5629 auto *VD = dyn_cast<VarDecl>(OldDecl); in checkDLLAttributeRedeclaration()
5632 auto *FD = dyn_cast<FunctionDecl>(OldDecl); in checkDLLAttributeRedeclaration()
5640 if (OldDecl->isUsed()) in checkDLLAttributeRedeclaration()
5641 if (!isa<FunctionDecl>(OldDecl) || !NewImportAttr) in checkDLLAttributeRedeclaration()
5649 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
5680 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
5689 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
5691 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
5696 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
8647 NamedDecl *OldDecl = nullptr; in CheckFunctionDeclaration() local
8660 OldDecl = Candidate; in CheckFunctionDeclaration()
8663 switch (CheckOverload(S, NewFD, Previous, OldDecl, in CheckFunctionDeclaration()
8685 OverloadedDecl = OldDecl; in CheckFunctionDeclaration()
8703 OldDecl = Previous.getFoundDecl(); in CheckFunctionDeclaration()
8707 if (OldDecl->hasAttr<OverloadableAttr>()) { in CheckFunctionDeclaration()
8715 if (IsOverload(NewFD, cast<FunctionDecl>(OldDecl), false)) { in CheckFunctionDeclaration()
8717 OldDecl = nullptr; in CheckFunctionDeclaration()
8737 if (OldDecl) in CheckFunctionDeclaration()
8738 OldMD = dyn_cast_or_null<CXXMethodDecl>(OldDecl->getAsFunction()); in CheckFunctionDeclaration()
8764 if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious)) { in CheckFunctionDeclaration()
8770 Previous.addDecl(OldDecl); in CheckFunctionDeclaration()
8773 = dyn_cast<FunctionTemplateDecl>(OldDecl)) { in CheckFunctionDeclaration()
8802 NewFD->setPreviousDeclaration(cast<FunctionDecl>(OldDecl)); in CheckFunctionDeclaration()
8805 NewFD->setAccess(OldDecl->getAccess()); in CheckFunctionDeclaration()