rdar://47397214
Details
- Reviewers
dcoughlin NoQ - Commits
- rGa9e295604a90: [analyzer] Insert notes in RetainCountChecker where our dynamic cast modeling…
rC351865: [analyzer] Insert notes in RetainCountChecker where our dynamic cast modeling…
rL351865: [analyzer] Insert notes in RetainCountChecker where our dynamic cast modeling…
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h | ||
---|---|---|
266–267 ↗ | (On Diff #182656) | I think you can put tags themselves here (as non-static members) and compare them by pointers later. |
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp | ||
514 ↗ | (On Diff #182656) | I think that there should be a note when the cast succeeds. Another thing to think about: should we add these pieces on *all* casts? Wouldn't it lead to displaying too much inlined diagnostics? Should we somehow mark these as prunable? Should we display them only when interesting objects are casted? |
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h | ||
---|---|---|
266–267 ↗ | (On Diff #182656) | That would be better - but then I need access to the checker in the visitor. |
clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp | ||
514 ↗ | (On Diff #182656) |
Not sure, usually readers assume that the cast succeeds when reading the code.
I haven't seen too much diagnostics from this in practice (by manually looking at reports).
Again not sure =/ Even if the object is not interesting failed casts can lead us to enter unexpected branches. |