Skip to content

Commit 6a22580

Browse files
authored
Switch sanity check to assert; NFC (#151181)
This was written out of an abundance of caution because the changes were being added to the release branch. Now we can be a little less cautious and switch to using an assert. No behavioral changes are expected.
1 parent 20d992d commit 6a22580

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/AST/ASTStructuralEquivalence.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -884,12 +884,10 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
884884
// class comparison.
885885
if (T1->getTypeClass() == Type::Enum) {
886886
T1 = T1->getAs<EnumType>()->getDecl()->getIntegerType();
887-
if (!T2->isBuiltinType() || T1.isNull()) // Sanity check
888-
return false;
887+
assert(T2->isBuiltinType() && !T1.isNull()); // Sanity check
889888
} else if (T2->getTypeClass() == Type::Enum) {
890889
T2 = T2->getAs<EnumType>()->getDecl()->getIntegerType();
891-
if (!T1->isBuiltinType() || T2.isNull()) // Sanity check
892-
return false;
890+
assert(T1->isBuiltinType() && !T2.isNull()); // Sanity check
893891
}
894892
TC = Type::Builtin;
895893
} else

0 commit comments

Comments
 (0)