Skip to content

Commit 6a15b26

Browse files
authored
Revert "Verify that a GenericTypeParamDecl's depth and index are correct" (#20432)
This reverts #20100 / commit 0bf65f1. It's causing problems on the Source Compatibility bot.
1 parent 2645a74 commit 6a15b26

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

lib/AST/ASTVerifier.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,37 +2738,6 @@ class Verifier : public ASTWalker {
27382738
verifyCheckedBase(nominal);
27392739
}
27402740

2741-
void verifyCheckedAlways(GenericTypeParamDecl *GTPD) {
2742-
PrettyStackTraceDecl debugStack("verifying GenericTypeParamDecl", GTPD);
2743-
2744-
const DeclContext *DC = GTPD->getDeclContext();
2745-
if (!GTPD->getDeclContext()->isInnermostContextGeneric()) {
2746-
Out << "DeclContext of GenericTypeParamDecl does not have "
2747-
"generic params";
2748-
abort();
2749-
}
2750-
2751-
GenericParamList *paramList =
2752-
static_cast<const GenericContext *>(DC)->getGenericParams();
2753-
if (!paramList) {
2754-
Out << "DeclContext of GenericTypeParamDecl does not have "
2755-
"generic params";
2756-
abort();
2757-
}
2758-
2759-
if (paramList->size() <= GTPD->getIndex() ||
2760-
paramList->getParams()[GTPD->getIndex()] != GTPD) {
2761-
Out << "GenericTypeParamDecl has incorrect index";
2762-
abort();
2763-
}
2764-
if (paramList->getDepth() != GTPD->getDepth()) {
2765-
Out << "GenericTypeParamDecl has incorrect depth";
2766-
abort();
2767-
}
2768-
2769-
verifyCheckedBase(GTPD);
2770-
}
2771-
27722741
void verifyChecked(ExtensionDecl *ext) {
27732742
// Make sure that the protocol conformances are complete.
27742743
for (auto conformance : ext->getLocalConformances()) {

0 commit comments

Comments
 (0)