Skip to content

Commit

Permalink
Fix trailing whitespaces introduced in #51 (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon authored May 31, 2024
1 parent 12a958d commit 03f5493
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/clangsa/GCChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ void GCChecker::validateValue(const ValueState* VS, CheckerContext &C, SymbolRef
int GCChecker::validateValueInner(const ValueState* VS) const {
if (!VS)
return VALID;

if (VS->isPotentiallyFreed()) {
return FREED;
}
Expand Down Expand Up @@ -563,7 +563,7 @@ void GCChecker::logWithDump(const std::string& message, const T &obj) {
void GCChecker::log(const std::string& message) {
if (!DEBUG_LOG)
return;

llvm::errs() << message;
llvm::errs() << "\n";
}
Expand Down Expand Up @@ -1625,7 +1625,7 @@ void GCChecker::checkPreCall(const CallEvent &Call, CheckerContext &C) const {
C, Sym,
"Passing non-rooted value as argument to function that may GC",
range);
}
}
}
if (ValState->isNotPinned()) {
bool MaybeUnpinned = false;
Expand Down Expand Up @@ -1753,7 +1753,7 @@ bool GCChecker::evalCall(const CallEvent &Call, CheckerContext &C) const {
State = State->set<GCPinMap>(Region, PinState::getTransitivePin(CurrentDepth));
} else {
logWithDump("- Root and pin", Region);
State = State->set<GCPinMap>(Region, PinState::getPin(CurrentDepth));
State = State->set<GCPinMap>(Region, PinState::getPin(CurrentDepth));
}
// The Argument array may also be used as a value, so make it rooted
// SymbolRef ArgArraySym = ArgArray.getAsSymbol();
Expand Down Expand Up @@ -1991,7 +1991,7 @@ void GCChecker::checkBind(SVal LVal, SVal RVal, const clang::Stmt *S,
}
report_value_error(C, Sym,
"Saw assignment to root, but missed the allocation");
}
}
} else {
logWithDump("- Found ValState for Sym", RValState);
validateValue(RValState, C, Sym, "Trying to root value which may have been");
Expand Down
2 changes: 1 addition & 1 deletion test/clangsa/MissingPinning.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void unpinned_argument() {
jl_svec_t *val = jl_svec1(NULL); // expected-note{{Started tracking value here}}
JL_GC_PROMISE_ROOTED(val); // expected-note{{Value was rooted here}}
look_at_value((jl_value_t*) val); // expected-warning{{Passing non-pinned value as argument to function that may GC}}
// expected-note@-1{{Passing non-pinned value as argument to function that may GC}}
// expected-note@-1{{Passing non-pinned value as argument to function that may GC}}
}

int allow_unpinned() {
Expand Down

0 comments on commit 03f5493

Please sign in to comment.