forked from OSchip/llvm-project
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:
parent
f30f347da1
commit
ddb01010b2
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue