Lines Matching refs:NewDecl
7004 NamedDecl *NewDecl, in checkDLLAttributeRedeclaration() argument
7007 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
7017 if (TemplateDecl *NewTD = dyn_cast<TemplateDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
7018 NewDecl = NewTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
7022 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
7027 const DLLImportAttr *NewImportAttr = NewDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7028 const DLLExportAttr *NewExportAttr = NewDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
7062 S.Diag(NewDecl->getLocation(), DiagID) in checkDLLAttributeRedeclaration()
7063 << NewDecl in checkDLLAttributeRedeclaration()
7067 NewDecl->setInvalidDecl(); in checkDLLAttributeRedeclaration()
7079 if (const auto *VD = dyn_cast<VarDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
7085 } else if (const auto *FD = dyn_cast<FunctionDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
7093 !NewDecl->isLocalExternDecl() && !IsQualifiedFriend) { in checkDLLAttributeRedeclaration()
7097 NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
7100 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7102 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
7104 << NewDecl; in checkDLLAttributeRedeclaration()
7106 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7107 NewDecl->addAttr(DLLExportAttr::CreateImplicit( in checkDLLAttributeRedeclaration()
7114 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
7116 << NewDecl << OldImportAttr; in checkDLLAttributeRedeclaration()
7120 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7126 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7127 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
7129 << NewDecl << OldImportAttr; in checkDLLAttributeRedeclaration()
7136 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
7143 NewDecl->addAttr(NewAttr); in checkDLLAttributeRedeclaration()