Lines Matching refs:NewDecl
6005 NamedDecl *NewDecl, in checkDLLAttributeRedeclaration() argument
6008 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
6018 if (TemplateDecl *NewTD = dyn_cast<TemplateDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
6019 NewDecl = NewTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
6023 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
6028 const DLLImportAttr *NewImportAttr = NewDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6029 const DLLExportAttr *NewExportAttr = NewDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
6063 S.Diag(NewDecl->getLocation(), DiagID) in checkDLLAttributeRedeclaration()
6064 << NewDecl in checkDLLAttributeRedeclaration()
6068 NewDecl->setInvalidDecl(); in checkDLLAttributeRedeclaration()
6080 if (const auto *VD = dyn_cast<VarDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
6086 } else if (const auto *FD = dyn_cast<FunctionDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
6094 !NewDecl->isLocalExternDecl() && !IsQualifiedFriend) { in checkDLLAttributeRedeclaration()
6096 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
6098 << NewDecl; in checkDLLAttributeRedeclaration()
6100 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6101 NewDecl->addAttr(::new (S.Context) DLLExportAttr( in checkDLLAttributeRedeclaration()
6105 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
6107 << NewDecl << OldImportAttr; in checkDLLAttributeRedeclaration()
6111 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6117 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6118 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
6120 << NewDecl << OldImportAttr; in checkDLLAttributeRedeclaration()
6127 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
6134 NewDecl->addAttr(NewAttr); in checkDLLAttributeRedeclaration()