Lines Matching defs:D2

42 //                                      Decl *D1, Decl *D2);
52 // Decl *D2)`. So far so good, this is almost like the BFS. However, if we
100 Decl *D1, Decl *D2);
1304 RecordDecl *D2 = Field2->getType()->castAs<RecordType>()->getDecl();
1305 return IsStructurallyEquivalent(Context, D1, D2);
1410 CXXRecordDecl *D1, CXXRecordDecl *D2) {
1411 assert(D1->isLambda() && D2->isLambda() &&
1414 D2->getLambdaCallOperator()))
1422 RecordDecl *D2) {
1428 DeclContext *DC2 = D2->getDeclContext()->getNonTransparentContext();
1458 RecordDecl *D1, RecordDecl *D2) {
1464 IdentifierInfo *Name2 = D2->getIdentifier();
1465 if (!Name2 && D2->getTypedefNameForAnonDecl())
1466 Name2 = D2->getTypedefNameForAnonDecl()->getIdentifier();
1470 if (D1->isUnion() != D2->isUnion()) {
1472 Context.Diag2(D2->getLocation(), Context.getApplicableDiagnostic(
1474 << Context.ToCtx.getTypeDeclType(D2);
1481 if (!D1->getDeclName() && !D2->getDeclName()) {
1488 D2)) {
1498 if (!IsRecordContextStructurallyEquivalent(D1, D2))
1504 const auto *Spec2 = dyn_cast<ClassTemplateSpecializationDecl>(D2);
1529 D2 = D2->getDefinition();
1530 if (!D1 || !D2)
1539 if (D1->hasExternalLexicalStorage() || D2->hasExternalLexicalStorage())
1544 if (D1->isBeingDefined() || D2->isBeingDefined())
1548 if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {
1563 Context.Diag2(D2->getLocation(),
1566 << Context.ToCtx.getTypeDeclType(D2);
1567 Context.Diag2(D2->getLocation(), diag::note_odr_number_of_bases)
1583 Context.Diag2(D2->getLocation(),
1586 << Context.ToCtx.getTypeDeclType(D2);
1598 Context.Diag2(D2->getLocation(),
1601 << Context.ToCtx.getTypeDeclType(D2);
1619 Context.Diag2(D2->getLocation(),
1624 Context.Diag2(D2->getLocation(), diag::note_odr_missing_friend);
1631 Context.Diag2(D2->getLocation(),
1644 Context.Diag2(D2->getLocation(),
1647 << Context.ToCtx.getTypeDeclType(D2);
1655 Context.Diag2(D2->getLocation(),
1658 << Context.ToCtx.getTypeDeclType(D2);
1662 Context.Diag2(D2->getLocation(), diag::note_odr_missing_base);
1669 QualType D2Type = Context.ToCtx.getTypeDeclType(D2);
1670 RecordDecl::field_iterator Field2 = D2->field_begin(),
1671 Field2End = D2->field_end();
1677 Context.Diag2(D2->getLocation(),
1680 << Context.ToCtx.getTypeDeclType(D2);
1683 Context.Diag2(D2->getLocation(), diag::note_odr_missing_field);
1694 Context.Diag2(D2->getLocation(), Context.getApplicableDiagnostic(
1696 << Context.ToCtx.getTypeDeclType(D2);
1709 EnumConstantDecl *D2) {
1711 const llvm::APSInt &ToVal = D2->getInitVal();
1719 if (!IsStructurallyEquivalent(D1->getIdentifier(), D2->getIdentifier()))
1724 D2->getInitExpr());
1729 EnumDecl *D1, EnumDecl *D2) {
1735 IdentifierInfo *Name2 = D2->getIdentifier();
1736 if (!Name2 && D2->getTypedefNameForAnonDecl())
1737 Name2 = D2->getTypedefNameForAnonDecl()->getIdentifier();
1744 D2 = D2->getDefinition();
1745 if (!D1 || !D2)
1748 EnumDecl::enumerator_iterator EC2 = D2->enumerator_begin(),
1749 EC2End = D2->enumerator_end();
1755 Context.Diag2(D2->getLocation(),
1758 << Context.ToCtx.getTypeDeclType(D2);
1761 Context.Diag2(D2->getLocation(), diag::note_odr_missing_enumerator);
1771 Context.Diag2(D2->getLocation(),
1774 << Context.ToCtx.getTypeDeclType(D2);
1786 Context.Diag2(D2->getLocation(), Context.getApplicableDiagnostic(
1788 << Context.ToCtx.getTypeDeclType(D2);
1836 TemplateTypeParmDecl *D2) {
1837 if (D1->isParameterPack() != D2->isParameterPack()) {
1839 Context.Diag2(D2->getLocation(),
1842 << D2->isParameterPack();
1854 NonTypeTemplateParmDecl *D2) {
1855 if (D1->isParameterPack() != D2->isParameterPack()) {
1857 Context.Diag2(D2->getLocation(),
1860 << D2->isParameterPack();
1868 if (!IsStructurallyEquivalent(Context, D1->getType(), D2->getType())) {
1870 Context.Diag2(D2->getLocation(),
1873 << D2->getType() << D1->getType();
1885 TemplateTemplateParmDecl *D2) {
1886 if (D1->isParameterPack() != D2->isParameterPack()) {
1888 Context.Diag2(D2->getLocation(),
1891 << D2->isParameterPack();
1900 D2->getTemplateParameters());
1904 StructuralEquivalenceContext &Ctx, TemplateDecl *D1, TemplateDecl *D2) {
1905 if (!IsStructurallyEquivalent(D1->getIdentifier(), D2->getIdentifier()))
1908 if (D1->getNameAsString() != D2->getNameAsString())
1911 D2->getTemplateParameters());
1916 ClassTemplateDecl *D2) {
1918 if (!IsTemplateDeclCommonStructurallyEquivalent(Context, D1, D2))
1923 D2->getTemplatedDecl());
1928 FunctionTemplateDecl *D2) {
1930 if (!IsTemplateDeclCommonStructurallyEquivalent(Context, D1, D2))
1935 D2->getTemplatedDecl()->getType());
1940 ConceptDecl *D2) {
1942 if (!IsTemplateDeclCommonStructurallyEquivalent(Context, D1, D2))
1947 D2->getConstraintExpr());
1951 FriendDecl *D1, FriendDecl *D2) {
1952 if ((D1->getFriendType() && D2->getFriendDecl()) ||
1953 (D1->getFriendDecl() && D2->getFriendType())) {
1956 if (D1->getFriendType() && D2->getFriendType())
1959 D2->getFriendType()->getType());
1960 if (D1->getFriendDecl() && D2->getFriendDecl())
1962 D2->getFriendDecl());
1967 TypedefNameDecl *D1, TypedefNameDecl *D2) {
1968 if (!IsStructurallyEquivalent(D1->getIdentifier(), D2->getIdentifier()))
1972 D2->getUnderlyingType());
1976 FunctionDecl *D1, FunctionDecl *D2) {
1977 if (!IsStructurallyEquivalent(D1->getIdentifier(), D2->getIdentifier()))
1981 if (!D2->isOverloadedOperator())
1983 if (D1->getOverloadedOperator() != D2->getOverloadedOperator())
1988 if (!IsStructurallyEquivalent(Context, D1->getType(), D2->getType()))
1995 ObjCIvarDecl *D1, ObjCIvarDecl *D2,
1997 if (D1->getAccessControl() != D2->getAccessControl())
2001 cast<FieldDecl>(D2), Owner2Type);
2005 ObjCIvarDecl *D1, ObjCIvarDecl *D2) {
2007 Context.ToCtx.getObjCInterfaceType(D2->getContainingInterface());
2008 return IsStructurallyEquivalent(Context, D1, D2, Owner2Type);
2059 ObjCCategoryDecl *D2) {
2060 if (!IsStructurallyEquivalent(D1->getIdentifier(), D2->getIdentifier()))
2064 D2->getClassInterface()->getIdentifier()))
2068 ObjCCategoryDecl::protocol_iterator Protocol2 = D2->protocol_begin(),
2069 Protocol2End = D2->protocol_end();
2083 QualType D2Type = Context.ToCtx.getObjCInterfaceType(D2->getClassInterface());
2084 ObjCCategoryDecl::ivar_iterator Ivar2 = D2->ivar_begin(),
2085 Ivar2End = D2->ivar_end();
2098 ObjCCategoryDecl::method_iterator Method2 = D2->meth_begin(),
2099 Method2End = D2->meth_end();
2116 Decl *D1, Decl *D2) {
2120 D2 = D2->getCanonicalDecl();
2121 std::pair<Decl *, Decl *> P{D1, D2};
2129 // If yes D1 and D2 will be checked later (from DeclsToCheck),
2247 bool StructuralEquivalenceContext::IsEquivalent(Decl *D1, Decl *D2) {
2260 if (!::IsStructurallyEquivalent(*this, D1, D2))
2284 bool StructuralEquivalenceContext::CheckCommonEquivalence(Decl *D1, Decl *D2) {
2287 TemplateDecl *Template2 = D2->getDescribedTemplate();
2299 Decl *D1, Decl *D2) {
2302 if (D1->getKind() != D2->getKind())
2312 static_cast<DERIVED##Decl *>(D2));
2325 Decl *D2 = P.second;
2328 CheckCommonEquivalence(D1, D2) && CheckKindSpecificEquivalence(D1, D2);