[cfe-commits] r53621 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Tue Jul 15 10:43:41 PDT 2008
Author: kremenek
Date: Tue Jul 15 12:43:41 2008
New Revision: 53621
URL: http://llvm.org/viewvc/llvm-project?rev=53621&view=rev
Log:
isRetain() and isRelease() now only returns true if "Retain"/"Release" appears in the suffix of a function's name.
Modified:
cfe/trunk/lib/Analysis/CFRefCount.cpp
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=53621&r1=53620&r2=53621&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Tue Jul 15 12:43:41 2008
@@ -694,11 +694,13 @@
}
static bool isRetain(FunctionDecl* FD, const char* FName) {
- return (strstr(FName, "Retain") != 0);
+ const char* loc = strstr(FName, "Retain");
+ return loc && loc[sizeof("Retain")-1] == '\0';
}
static bool isRelease(FunctionDecl* FD, const char* FName) {
- return (strstr(FName, "Release") != 0);
+ const char* loc = strstr(FName, "Release");
+ return loc && loc[sizeof("Release")-1] == '\0';
}
RetainSummary* RetainSummaryManager::getCFSummary(FunctionDecl* FD,
More information about the cfe-commits
mailing list