diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-05-07 04:25:59 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-05-07 04:25:59 +0000 |
commit | 84060dbbe5b06c26b25d0ba7107213479a2e0f8b (patch) | |
tree | 1d163f165f71138940a9b3b59afbafb540b364e2 | |
parent | a4b695a935fa81eefd3b4c33d4d5ae33e33bb4d0 (diff) |
Be less promiscuous with generating summaries for "new", "copy", "create".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50798 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 8e26b679e8..72c5e0ab60 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -492,7 +492,6 @@ static bool isCFRefType(QualType T) { return true; } -#if 0 static bool isNSType(QualType T) { if (!T->isPointerType()) @@ -513,8 +512,6 @@ static bool isNSType(QualType T) { return true; } -#endif - RetainSummary* RetainSummaryManager::getCFSummaryCreateRule(FunctionDecl* FD) { @@ -606,6 +603,9 @@ RetainSummaryManager::getMethodSummary(ObjCMessageExpr* ME) { // "copyXXX", "createXXX", "newXXX": allocators. + if (!isNSType(ME->getReceiver()->getType())) + return 0; + if (strcasestr(s, "create") == 0 || strcasestr(s, "copy") == 0 || strcasestr(s, "new") == 0) { |