Home | History | Annotate | Download | only in AST

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);
1241 RecordDecl *D2 = Field2->getType()->castAs<RecordType>()->getDecl();
1242 return IsStructurallyEquivalent(Context, D1, D2);
1339 CXXRecordDecl *D1, CXXRecordDecl *D2) {
1340 assert(D1->isLambda() && D2->isLambda() &&
1343 D2->getLambdaCallOperator()))
1351 RecordDecl *D1, RecordDecl *D2) {
1357 IdentifierInfo *Name2 = D2->getIdentifier();
1358 if (!Name2 && D2->getTypedefNameForAnonDecl())
1359 Name2 = D2->getTypedefNameForAnonDecl()->getIdentifier();
1363 if (D1->isUnion() != D2->isUnion()) {
1365 Context.Diag2(D2->getLocation(), Context.getApplicableDiagnostic(
1367 << Context.ToCtx.getTypeDeclType(D2);
1374 if (!D1->getDeclName() && !D2->getDeclName()) {
1381 D2)) {
1391 const auto *Spec2 = dyn_cast<ClassTemplateSpecializationDecl>(D2);
1416 D2 = D2->getDefinition();
1417 if (!D1 || !D2)
1426 if (D1->hasExternalLexicalStorage() || D2->hasExternalLexicalStorage())
1431 if (D1->isBeingDefined() || D2->isBeingDefined())
1435 if (auto *D2CXX = dyn_cast<CXXRecordDecl>(D2)) {
1450 Context.Diag2(D2->getLocation(),
1453 << Context.ToCtx.getTypeDeclType(D2);
1454 Context.Diag2(D2->getLocation(), diag::note_odr_number_of_bases)
1470 Context.Diag2(D2->getLocation(),
1473 << Context.ToCtx.getTypeDeclType(D2);
1485 Context.Diag2(D2->getLocation(),
1488 << Context.ToCtx.getTypeDeclType(D2);
1506 Context.Diag2(D2->getLocation(),
1511 Context.Diag2(D2->getLocation(), diag::note_odr_missing_friend);
1518 Context.Diag2(D2->getLocation(),
1531 Context.Diag2(D2->getLocation(),
1534 << Context.ToCtx.getTypeDeclType(D2);
1542 Context.Diag2(D2->getLocation(),
1545 << Context.ToCtx.getTypeDeclType(D2);
1549 Context.Diag2(D2->getLocation(), diag::note_odr_missing_base);
1556 RecordDecl::field_iterator Field2 = D2->field_begin(),
1557 Field2End = D2->field_end();
1563 Context.Diag2(D2->getLocation(),
1566 << Context.ToCtx.getTypeDeclType(D2);
1569 Context.Diag2(D2->getLocation(), diag::note_odr_missing_field);
1580 Context.Diag2(D2->getLocation(), Context.getApplicableDiagnostic(
1582 << Context.ToCtx.getTypeDeclType(D2);
1595 EnumDecl *D1, EnumDecl *D2) {
1601 IdentifierInfo *Name2 = D2->getIdentifier();
1602 if (!Name2 && D2->getTypedefNameForAnonDecl())
1603 Name2 = D2->getTypedefNameForAnonDecl()->getIdentifier();
1610 D2 = D2->getDefinition();
1611 if (!D1 || !D2)
1614 EnumDecl::enumerator_iterator EC2 = D2->enumerator_begin(),
1615 EC2End = D2->enumerator_end();
1621 Context.Diag2(D2->getLocation(),
1624 << Context.ToCtx.getTypeDeclType(D2);
1627 Context.Diag2(D2->getLocation(), diag::note_odr_missing_enumerator);
1637 Context.Diag2(D2->getLocation(),
1640 << Context.ToCtx.getTypeDeclType(D2);
1652 Context.Diag2(D2->getLocation(), Context.getApplicableDiagnostic(
1654 << Context.ToCtx.getTypeDeclType(D2);
1702 TemplateTypeParmDecl *D2) {
1703 if (D1->isParameterPack() != D2->isParameterPack()) {
1705 Context.Diag2(D2->getLocation(),
1708 << D2->isParameterPack();
1720 NonTypeTemplateParmDecl *D2) {
1721 if (D1->isParameterPack() != D2->isParameterPack()) {
1723 Context.Diag2(D2->getLocation(),
1726 << D2->isParameterPack();
1734 if (!IsStructurallyEquivalent(Context, D1->getType(), D2->getType())) {
1736 Context.Diag2(D2->getLocation(),
1739 << D2->getType() << D1->getType();
1751 TemplateTemplateParmDecl *D2) {
1752 if (D1->isParameterPack() != D2->isParameterPack()) {
1754 Context.Diag2(D2->getLocation(),
1757 << D2->isParameterPack();
1766 D2->getTemplateParameters());
1770 StructuralEquivalenceContext &Ctx, TemplateDecl *D1, TemplateDecl *D2) {
1771 if (!IsStructurallyEquivalent(D1->getIdentifier(), D2->getIdentifier()))
1774 if (D1->getNameAsString() != D2->getNameAsString())
1777 D2->getTemplateParameters());
1782 ClassTemplateDecl *D2) {
1784 if (!IsTemplateDeclCommonStructurallyEquivalent(Context, D1, D2))
1789 D2->getTemplatedDecl());
1794 FunctionTemplateDecl *D2) {
1796 if (!IsTemplateDeclCommonStructurallyEquivalent(Context, D1, D2))
1801 D2->getTemplatedDecl()->getType());
1806 ConceptDecl *D2) {
1808 if (!IsTemplateDeclCommonStructurallyEquivalent(Context, D1, D2))
1813 D2->getConstraintExpr());
1817 FriendDecl *D1, FriendDecl *D2) {
1818 if ((D1->getFriendType() && D2->getFriendDecl()) ||
1819 (D1->getFriendDecl() && D2->getFriendType())) {
1822 if (D1->getFriendType() && D2->getFriendType())
1825 D2->getFriendType()->getType());
1826 if (D1->getFriendDecl() && D2->getFriendDecl())
1828 D2->getFriendDecl());
1833 TypedefNameDecl *D1, TypedefNameDecl *D2) {
1834 if (!IsStructurallyEquivalent(D1->getIdentifier(), D2->getIdentifier()))
1838 D2->getUnderlyingType());
1842 FunctionDecl *D1, FunctionDecl *D2) {
1843 if (!IsStructurallyEquivalent(D1->getIdentifier(), D2->getIdentifier()))
1847 if (!D2->isOverloadedOperator())
1849 if (D1->getOverloadedOperator() != D2->getOverloadedOperator())
1854 if (!IsStructurallyEquivalent(Context, D1->getType(), D2->getType()))
1862 Decl *D1, Decl *D2) {
1866 D2 = D2->getCanonicalDecl();
1867 std::pair<Decl *, Decl *> P{D1, D2};
1875 // If yes D1 and D2 will be checked later (from DeclsToCheck),
1993 bool StructuralEquivalenceContext::IsEquivalent(Decl *D1, Decl *D2) {
2006 if (!::IsStructurallyEquivalent(*this, D1, D2))
2030 bool StructuralEquivalenceContext::CheckCommonEquivalence(Decl *D1, Decl *D2) {
2033 TemplateDecl *Template2 = D2->getDescribedTemplate();
2045 Decl *D1, Decl *D2) {
2048 if (D1->getKind() != D2->getKind())
2058 static_cast<DERIVED##Decl *>(D2));
2071 Decl *D2 = P.second;
2074 CheckCommonEquivalence(D1, D2) && CheckKindSpecificEquivalence(D1, D2);