Lines Matching refs:NewDecl
7148 NamedDecl *NewDecl, in checkDLLAttributeRedeclaration() argument
7151 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
7161 if (TemplateDecl *NewTD = dyn_cast<TemplateDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
7162 NewDecl = NewTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
7166 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
7171 const DLLImportAttr *NewImportAttr = NewDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7172 const DLLExportAttr *NewExportAttr = NewDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
7206 S.Diag(NewDecl->getLocation(), DiagID) in checkDLLAttributeRedeclaration()
7207 << NewDecl in checkDLLAttributeRedeclaration()
7211 NewDecl->setInvalidDecl(); in checkDLLAttributeRedeclaration()
7223 if (const auto *VD = dyn_cast<VarDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
7229 } else if (const auto *FD = dyn_cast<FunctionDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
7237 !NewDecl->isLocalExternDecl() && !IsQualifiedFriend) { in checkDLLAttributeRedeclaration()
7241 NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
7244 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7246 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
7248 << NewDecl; in checkDLLAttributeRedeclaration()
7250 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7251 NewDecl->addAttr(DLLExportAttr::CreateImplicit( in checkDLLAttributeRedeclaration()
7258 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
7260 << NewDecl << OldImportAttr; in checkDLLAttributeRedeclaration()
7264 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7270 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
7271 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
7273 << NewDecl << OldImportAttr; in checkDLLAttributeRedeclaration()
7280 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
7287 NewDecl->addAttr(NewAttr); in checkDLLAttributeRedeclaration()