Lines Matching refs:OldDecl

7147 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl,  in checkDLLAttributeRedeclaration()  argument
7151 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
7155 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) { in checkDLLAttributeRedeclaration()
7156 OldDecl = OldTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
7166 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
7169 const DLLImportAttr *OldImportAttr = OldDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7170 const DLLExportAttr *OldExportAttr = OldDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
7185 if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) { in checkDLLAttributeRedeclaration()
7188 if (!OldDecl->isCXXClassMember()) { in checkDLLAttributeRedeclaration()
7189 auto *VD = dyn_cast<VarDecl>(OldDecl); in checkDLLAttributeRedeclaration()
7192 auto *FD = dyn_cast<FunctionDecl>(OldDecl); in checkDLLAttributeRedeclaration()
7200 if (OldDecl->isUsed()) in checkDLLAttributeRedeclaration()
7201 if (!isa<FunctionDecl>(OldDecl) || !NewImportAttr) in checkDLLAttributeRedeclaration()
7209 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
7249 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
7261 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); in checkDLLAttributeRedeclaration()
7263 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7269 OldDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
11388 NamedDecl *&OldDecl, in CheckTargetCausesMultiVersioning() argument
11420 OldDecl = OldFD; in CheckTargetCausesMultiVersioning()
11485 OldDecl = nullptr; in CheckTargetCausesMultiVersioning()
11508 bool &Redeclaration, NamedDecl *&OldDecl, LookupResult &Previous) { in CheckMultiVersionAdditionalDecl() argument
11571 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
11592 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
11611 OldDecl = CurFD; in CheckMultiVersionAdditionalDecl()
11645 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
11665 OldDecl = ND; in CheckMultiVersionAdditionalDecl()
11708 OldDecl = OldFD; in CheckMultiVersionAdditionalDecl()
11714 OldDecl = nullptr; in CheckMultiVersionAdditionalDecl()
11726 bool &Redeclaration, NamedDecl *&OldDecl, in CheckMultiVersionFunction() argument
11754 if (!OldDecl || !OldDecl->getAsFunction() || in CheckMultiVersionFunction()
11755 OldDecl->getDeclContext()->getRedeclContext() != in CheckMultiVersionFunction()
11764 FunctionDecl *OldFD = OldDecl->getAsFunction(); in CheckMultiVersionFunction()
11779 OldDecl = OldFD; in CheckMultiVersionFunction()
11801 OldDecl, Previous); in CheckMultiVersionFunction()
11822 OldDecl, Previous); in CheckMultiVersionFunction()
11882 NamedDecl *OldDecl = nullptr; in CheckFunctionDeclaration() local
11896 OldDecl = Candidate; in CheckFunctionDeclaration()
11900 switch (CheckOverload(S, NewFD, Previous, OldDecl, in CheckFunctionDeclaration()
11924 OldDecl = Previous.getFoundDecl(); in CheckFunctionDeclaration()
11928 if (OldDecl->hasAttr<OverloadableAttr>() || in CheckFunctionDeclaration()
11930 if (IsOverload(NewFD, cast<FunctionDecl>(OldDecl), false)) { in CheckFunctionDeclaration()
11933 OldDecl = nullptr; in CheckFunctionDeclaration()
11939 if (CheckMultiVersionFunction(*this, NewFD, Redeclaration, OldDecl, Previous)) in CheckFunctionDeclaration()
11964 if (OldDecl) in CheckFunctionDeclaration()
11965 OldMD = dyn_cast_or_null<CXXMethodDecl>(OldDecl->getAsFunction()); in CheckFunctionDeclaration()
11991 if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious, in CheckFunctionDeclaration()
11998 Previous.addDecl(OldDecl); in CheckFunctionDeclaration()
12001 dyn_cast<FunctionTemplateDecl>(OldDecl)) { in CheckFunctionDeclaration()
12035 if (shouldLinkDependentDeclWithPrevious(NewFD, OldDecl)) { in CheckFunctionDeclaration()
12036 auto *OldFD = cast<FunctionDecl>(OldDecl); in CheckFunctionDeclaration()