Skip to content

Commit e9c7010

Browse files
Simplify assert
1 parent 47c1601 commit e9c7010

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,10 +1230,7 @@ ProgramStateRef StreamChecker::ensureGetdelimBufferAndSizeCorrect(
12301230
if (!LinePtrSVal || !NSVal)
12311231
return nullptr;
12321232

1233-
assert(LinePtrPtrExpr &&
1234-
"Expected an argument with a pointer to a pointer to the buffer.");
1235-
assert(SizePtrExpr &&
1236-
"Expected an argument with a pointer to the buffer size.");
1233+
assert(LinePtrPtrExpr && SizePtrExpr);
12371234

12381235
// If the line pointer is null, and n is > 0, there is UB.
12391236
const auto [LinePtrNotNull, LinePtrNull] = State->assume(*LinePtrSVal);

0 commit comments

Comments
 (0)