diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-02-11 07:10:07 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-02-11 07:10:07 +0000 |
| commit | bdc2c0c9906792f0f57bf80db99f0ee60a902a86 (patch) | |
| tree | 0052bf94624952229e2bdd11a710571029991640 /clang/lib/Analysis | |
| parent | d0d8c540ca15bfbd6175fcfde940cc4cb8b86384 (diff) | |
| download | bcm5719-llvm-bdc2c0c9906792f0f57bf80db99f0ee60a902a86.tar.gz bcm5719-llvm-bdc2c0c9906792f0f57bf80db99f0ee60a902a86.zip | |
Per PR 3187, disable the missing -dealloc check for classes that subclass SenTestCase.
llvm-svn: 64292
Diffstat (limited to 'clang/lib/Analysis')
| -rw-r--r-- | clang/lib/Analysis/CheckObjCDealloc.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/clang/lib/Analysis/CheckObjCDealloc.cpp b/clang/lib/Analysis/CheckObjCDealloc.cpp index dda25017c34..a14ae265128 100644 --- a/clang/lib/Analysis/CheckObjCDealloc.cpp +++ b/clang/lib/Analysis/CheckObjCDealloc.cpp @@ -121,11 +121,23 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D, // Determine if the class subclasses NSObject. IdentifierInfo* NSObjectII = &Ctx.Idents.get("NSObject"); + IdentifierInfo* SenTestCaseII = &Ctx.Idents.get("SenTestCase"); + - for ( ; ID ; ID = ID->getSuperClass()) - if (ID->getIdentifier() == NSObjectII) + for ( ; ID ; ID = ID->getSuperClass()) { + IdentifierInfo *II = ID->getIdentifier(); + + if (II == NSObjectII) break; - + + // FIXME: For now, ignore classes that subclass SenTestCase, as these don't + // need to implement -dealloc. They implement tear down in another way, + // which we should try and catch later. + // http://llvm.org/bugs/show_bug.cgi?id=3187 + if (II == SenTestCaseII) + return; + } + if (!ID) return; |

