Lines Matching refs:NewDecl
6551 NamedDecl *NewDecl, in checkDLLAttributeRedeclaration() argument
6554 if (OldDecl->isInvalidDecl() || NewDecl->isInvalidDecl()) in checkDLLAttributeRedeclaration()
6564 if (TemplateDecl *NewTD = dyn_cast<TemplateDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
6565 NewDecl = NewTD->getTemplatedDecl(); in checkDLLAttributeRedeclaration()
6569 if (!OldDecl || !NewDecl) in checkDLLAttributeRedeclaration()
6574 const DLLImportAttr *NewImportAttr = NewDecl->getAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6575 const DLLExportAttr *NewExportAttr = NewDecl->getAttr<DLLExportAttr>(); in checkDLLAttributeRedeclaration()
6609 S.Diag(NewDecl->getLocation(), DiagID) in checkDLLAttributeRedeclaration()
6610 << NewDecl in checkDLLAttributeRedeclaration()
6614 NewDecl->setInvalidDecl(); in checkDLLAttributeRedeclaration()
6626 if (const auto *VD = dyn_cast<VarDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
6632 } else if (const auto *FD = dyn_cast<FunctionDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
6640 !NewDecl->isLocalExternDecl() && !IsQualifiedFriend) { in checkDLLAttributeRedeclaration()
6642 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
6644 << NewDecl; in checkDLLAttributeRedeclaration()
6646 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6647 NewDecl->addAttr( in checkDLLAttributeRedeclaration()
6650 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
6652 << NewDecl << OldImportAttr; in checkDLLAttributeRedeclaration()
6656 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6662 NewDecl->dropAttr<DLLImportAttr>(); in checkDLLAttributeRedeclaration()
6663 S.Diag(NewDecl->getLocation(), in checkDLLAttributeRedeclaration()
6665 << NewDecl << OldImportAttr; in checkDLLAttributeRedeclaration()
6672 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(NewDecl)) { in checkDLLAttributeRedeclaration()
6679 NewDecl->addAttr(NewAttr); in checkDLLAttributeRedeclaration()