Lines Matching defs:OldDecl

7054 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl,
7058 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl())
7062 if (TemplateDecl *OldTD = dyn_cast<TemplateDecl>(OldDecl)) {
7063 OldDecl = OldTD->getTemplatedDecl();
7073 if (!OldDecl || !NewDecl)
7076 const DLLImportAttr *OldImportAttr = OldDecl->getAttr<DLLImportAttr>();
7077 const DLLExportAttr *OldExportAttr = OldDecl->getAttr<DLLExportAttr>();
7092 if (AddsAttr && !IsSpecialization && !OldDecl->isImplicit()) {
7095 if (!OldDecl->isCXXClassMember()) {
7096 auto *VD = dyn_cast<VarDecl>(OldDecl);
7099 auto *FD = dyn_cast<FunctionDecl>(OldDecl);
7107 if (OldDecl->isUsed())
7108 if (!isa<FunctionDecl>(OldDecl) || !NewImportAttr)
7116 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration);
7156 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration);
7168 S.Diag(OldDecl->getLocation(), diag::note_previous_declaration);
7170 OldDecl->dropAttr<DLLImportAttr>();
7176 OldDecl->dropAttr<DLLImportAttr>();
11461 NamedDecl *&OldDecl,
11500 OldDecl = OldFD;
11549 OldDecl = nullptr;
11588 const TargetClonesAttr *NewClones, bool &Redeclaration, NamedDecl *&OldDecl,
11646 OldDecl = ND;
11667 OldDecl = ND;
11736 OldDecl = CurFD;
11758 OldDecl = ND;
11778 OldDecl = ND;
11819 OldDecl = OldFD;
11825 OldDecl = nullptr;
11837 bool &Redeclaration, NamedDecl *&OldDecl,
11875 if (!OldDecl || !OldDecl->getAsFunction() ||
11876 !OldDecl->getDeclContext()->getRedeclContext()->Equals(
11885 FunctionDecl *OldFD = OldDecl->getAsFunction();
11906 S, OldFD, NewFD, Redeclaration, OldDecl, Previous);
11927 OldDecl, Previous);
11970 NamedDecl *OldDecl = nullptr;
11985 OldDecl = Candidate;
11989 switch (CheckOverload(S, NewFD, Previous, OldDecl,
12013 OldDecl = Previous.getFoundDecl();
12017 if (OldDecl->hasAttr<OverloadableAttr>() ||
12019 if (IsOverload(NewFD, cast<FunctionDecl>(OldDecl), false)) {
12022 OldDecl = nullptr;
12028 if (CheckMultiVersionFunction(*this, NewFD, Redeclaration, OldDecl, Previous))
12082 if (OldDecl)
12083 OldMD = dyn_cast_or_null<CXXMethodDecl>(OldDecl->getAsFunction());
12107 // NewFD and OldDecl represent declarations that need to be
12109 if (MergeFunctionDecl(NewFD, OldDecl, S, MergeTypeWithPrevious,
12116 Previous.addDecl(OldDecl);
12119 dyn_cast<FunctionTemplateDecl>(OldDecl)) {
12153 if (shouldLinkDependentDeclWithPrevious(NewFD, OldDecl)) {
12154 auto *OldFD = cast<FunctionDecl>(OldDecl);