HomePhabricator

[analyzer] Support allocClassWithName in OSObjectCStyleCast checker

Authored by vsavchenko on Mar 29 2021, 5:38 AM.

Description

[analyzer] Support allocClassWithName in OSObjectCStyleCast checker

allocClassWithName allocates an object with the given type.
The type is actually provided as a string argument (type's name).
This creates a possibility for not particularly useful warnings
from the analyzer.

In order to combat with those, this patch checks for casts of the
allocClassWithName results to types mentioned directly as its
argument. All other uses of this method should be reasoned about
as before.

rdar://72165694

Differential Revision: https://reviews.llvm.org/D99500

Details

Committed
vsavchenkoMar 30 2021, 5:58 AM
Differential Revision
D99500: [analyzer] Support allocClassWithName in OSObjectCStyleCast checker
Parents
rGefa7df1682c2: [Analyzer] Track RValue expressions
Branches
Unknown
Tags
Unknown