Revert "[analyzer] RetainCountChecker: Add a suppression for OSSymbols."

This reverts commit 3500cc8d89.

This old commit was made over a completely false premise. OSSymbols
aren't different from other OSObjects and we shouldn't treat them
differently for the purposes of static analysis.
This commit is contained in:
Artem Dergachev 2021-02-09 23:21:20 -08:00
parent f30f347da1
commit ddb01010b2
2 changed files with 1 additions and 13 deletions

View File

@ -146,9 +146,7 @@ static bool isSubclass(const Decl *D,
}
static bool isOSObjectSubclass(const Decl *D) {
// OSSymbols are particular OSObjects that are allocated globally
// and therefore aren't really refcounted, so we ignore them.
return D && isSubclass(D, "OSMetaClassBase") && !isSubclass(D, "OSSymbol");
return D && isSubclass(D, "OSMetaClassBase");
}
static bool isOSObjectDynamicCast(StringRef S) {

View File

@ -53,9 +53,6 @@ struct MyArray : public OSArray {
OSObject *generateObject(OSObject *input) override;
};
// These are never refcounted.
struct OSSymbol : OSObject {};
struct OtherStruct {
static void doNothingToArray(OSArray *array);
OtherStruct(OSArray *arr);
@ -757,10 +754,3 @@ void test() {
b(0);
}
} // namespace inherited_constructor_crash
namespace ossymbol_suppression {
OSSymbol *createSymbol();
void test() {
OSSymbol *sym = createSymbol(); // no-warning
}
} // namespace ossymbol_suppression