Skip to content

Commit 2856e72

Browse files
authored
[analyzer][NFC] Remove outdated FIXME comment (#68211)
This trivial commit removes a 13-year-old FIXME comment from MallocChecker.cpp because it was fixed at least 10 years ago when `getConjuredHeapSymbolVal()` was added.
1 parent 6afbc09 commit 2856e72

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -1961,13 +1961,10 @@ ProgramStateRef MallocChecker::FreeMemAux(
19611961
// Parameters, locals, statics, globals, and memory returned by
19621962
// __builtin_alloca() shouldn't be freed.
19631963
if (!isa<UnknownSpaceRegion, HeapSpaceRegion>(MS)) {
1964-
// FIXME: at the time this code was written, malloc() regions were
1965-
// represented by conjured symbols, which are all in UnknownSpaceRegion.
1966-
// This means that there isn't actually anything from HeapSpaceRegion
1967-
// that should be freed, even though we allow it here.
1968-
// Of course, free() can work on memory allocated outside the current
1969-
// function, so UnknownSpaceRegion is always a possibility.
1970-
// False negatives are better than false positives.
1964+
// Regions returned by malloc() are represented by SymbolicRegion objects
1965+
// within HeapSpaceRegion. Of course, free() can work on memory allocated
1966+
// outside the current function, so UnknownSpaceRegion is also a
1967+
// possibility here.
19711968

19721969
if (isa<AllocaRegion>(R))
19731970
HandleFreeAlloca(C, ArgVal, ArgExpr->getSourceRange());

0 commit comments

Comments
 (0)