Skip to content

Commit 5a1028c

Browse files
committed
Remove type argument where it can be obtained from call result
1 parent 2aaeb5e commit 5a1028c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,9 +2461,9 @@ void CStringChecker::evalStrsep(CheckerContext &C,
24612461

24622462
// Overwrite the search string pointer. The new value is either an address
24632463
// further along in the same string, or NULL if there are no more tokens.
2464-
State = State->bindLoc(
2465-
*SearchStrLoc,
2466-
SVB.conjureSymbolVal(Call, CharPtrTy, C.blockCount(), getTag()), LCtx);
2464+
State = State->bindLoc(*SearchStrLoc,
2465+
SVB.conjureSymbolVal(Call, C.blockCount(), getTag()),
2466+
LCtx);
24672467
} else {
24682468
assert(SearchStrVal.isUnknown());
24692469
// Conjure a symbolic value. It's the best we can do.

clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,8 +1479,7 @@ bool StdLibraryFunctionsChecker::evalCall(const CallEvent &Call,
14791479
ProgramStateRef State = C.getState();
14801480
const LocationContext *LC = C.getLocationContext();
14811481
const auto *CE = cast<CallExpr>(Call.getOriginExpr());
1482-
SVal V = C.getSValBuilder().conjureSymbolVal(
1483-
Call, CE->getType().getCanonicalType(), C.blockCount());
1482+
SVal V = C.getSValBuilder().conjureSymbolVal(Call, C.blockCount());
14841483
State = State->BindExpr(CE, LC, V);
14851484

14861485
C.addTransition(State);

clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void InvalidPtrChecker::postPreviousReturnInvalidatingCall(
207207

208208
// Function call will return a pointer to the new symbolic region.
209209
DefinedOrUnknownSVal RetVal =
210-
C.getSValBuilder().conjureSymbolVal(Call, CE->getType(), C.blockCount());
210+
C.getSValBuilder().conjureSymbolVal(Call, C.blockCount());
211211
State = State->BindExpr(CE, LCtx, RetVal);
212212

213213
const auto *SymRegOfRetVal =

0 commit comments

Comments
 (0)