[PATCH] D83961: [Analyzer] Fix bug report source locations in minimal output.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 21 12:44:02 PDT 2020
NoQ added inline comments.
================
Comment at: clang/test/Analysis/CGColorSpace.c:8-11
void f() {
- CGColorSpaceRef X = CGColorSpaceCreateDeviceRGB(); // expected-warning{{leak}}
+ CGColorSpaceRef X = CGColorSpaceCreateDeviceRGB();
CGColorSpaceRetain(X);
+} // expected-warning{{leak}}
----------------
This change doesn't look expected to me. It's not "we've found a report on a different path" (there's only one path here), it's "we're reporting the same report in a different location" (previously it was the uniqueing location, now it's the end-of-path location).
That said, RetainCountChecker is special because it has its own `PathSensitiveBugReport` sub-class with custom behavior. I think we should get regular checkers like MallocChecker right first. Are there more changes on tests on regular checkers? Or is the one in `malloc-plist.c` the only one?
================
Comment at: clang/test/Analysis/malloc-plist.c:137-139
if (y)
- y++;
-}//expected-warning{{Potential leak}}
+ y++; //expected-warning{{Potential leak}}
+}
----------------
This sounds like an expected change: we're now displaying the same report on a different path. Except it's the longer path rather than the shorter path, so it still looks suspicious.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83961/new/
https://reviews.llvm.org/D83961
More information about the cfe-commits
mailing list