@@ -1293,7 +1293,7 @@ void MallocChecker::checkCXXNewOrCXXDelete(const CallEvent &Call,
1293
1293
AF_CXXNewArray);
1294
1294
break ;
1295
1295
default :
1296
- llvm_unreachable ( " not a new/delete operator" );
1296
+ assert ( false && " not a new/delete operator" );
1297
1297
}
1298
1298
1299
1299
C.addTransition (State);
@@ -1490,7 +1490,7 @@ ProgramStateRef MallocChecker::ProcessZeroAllocCheck(
1490
1490
return State;
1491
1491
}
1492
1492
} else
1493
- llvm_unreachable ( " not a CallExpr or CXXNewExpr" );
1493
+ assert ( false && " not a CallExpr or CXXNewExpr" );
1494
1494
1495
1495
assert (Arg);
1496
1496
@@ -1925,7 +1925,7 @@ static void printExpectedAllocName(raw_ostream &os, AllocationFamily Family) {
1925
1925
case AF_IfNameIndex: os << " 'if_nameindex()'" ; return ;
1926
1926
case AF_InnerBuffer: os << " container-specific allocator" ; return ;
1927
1927
case AF_Alloca:
1928
- case AF_None: llvm_unreachable ( " not a deallocation expression" );
1928
+ case AF_None: assert ( false && " not a deallocation expression" );
1929
1929
}
1930
1930
}
1931
1931
@@ -1937,7 +1937,7 @@ static void printExpectedDeallocName(raw_ostream &os, AllocationFamily Family) {
1937
1937
case AF_IfNameIndex: os << " 'if_freenameindex()'" ; return ;
1938
1938
case AF_InnerBuffer: os << " container-specific deallocator" ; return ;
1939
1939
case AF_Alloca:
1940
- case AF_None: llvm_unreachable ( " suspicious argument" );
1940
+ case AF_None: assert ( false && " suspicious argument" );
1941
1941
}
1942
1942
}
1943
1943
@@ -2145,10 +2145,10 @@ MallocChecker::getCheckIfTracked(AllocationFamily Family,
2145
2145
return std::nullopt;
2146
2146
}
2147
2147
case AF_None: {
2148
- llvm_unreachable ( " no family" );
2148
+ assert ( false && " no family" );
2149
2149
}
2150
2150
}
2151
- llvm_unreachable ( " unhandled family" );
2151
+ assert ( false && " unhandled family" );
2152
2152
}
2153
2153
2154
2154
std::optional<MallocChecker::CheckKind>
@@ -3528,7 +3528,7 @@ PathDiagnosticPieceRef MallocBugVisitor::VisitNode(const ExplodedNode *N,
3528
3528
break ;
3529
3529
}
3530
3530
case AF_None:
3531
- llvm_unreachable ( " Unhandled allocation family!" );
3531
+ assert ( false && " Unhandled allocation family!" );
3532
3532
}
3533
3533
3534
3534
// See if we're releasing memory while inlining a destructor
0 commit comments