Skip to content

Commit 33fb3e3

Browse files
Fix crash when lambda is null
1 parent 67019c9 commit 33fb3e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/lib/AST/ASTStructuralEquivalence.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,12 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
16091609
static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
16101610
CXXMethodDecl *Method1,
16111611
CXXMethodDecl *Method2) {
1612+
if (!Method1 && !Method2) {
1613+
return true;
1614+
}
1615+
if (!Method1 || !Method2) {
1616+
return false;
1617+
}
16121618
bool PropertiesEqual =
16131619
Method1->getDeclKind() == Method2->getDeclKind() &&
16141620
Method1->getRefQualifier() == Method2->getRefQualifier() &&

0 commit comments

Comments
 (0)