[analyzer] Retain count checker for OSObject: recognize OSDynamicCast
ClosedPublic

Authored by george.karpenkov on Thu, Oct 11, 11:40 AM.

Diff Detail

Repository
rL LLVM
NoQ accepted this revision.Thu, Oct 11, 2:03 PM

Because it's all wrapped into an explicit cast to type *, evaluating cast manually is indeed unnecessary.

clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
779 ↗(On Diff #169263)

TODO: Use DynamicTypeInfo to return 0 when cast fails?

clang/test/Analysis/osobject-retain-release.cpp
34 ↗(On Diff #169263)

// no-warnings?

This revision is now accepted and ready to land.Thu, Oct 11, 2:03 PM
This revision was automatically updated to reflect the committed changes.