Extend "followsFundamentalRule" to ignore prefix '_' characters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58469 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index fe7a198..87a6b38 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -54,6 +54,7 @@
// not release it."
//
static bool followsFundamentalRule(const char* s) {
+ while (*s == '_') ++s;
return CStrInCStrNoCase(s, "create") || CStrInCStrNoCase(s, "copy") ||
CStrInCStrNoCase(s, "new") == s || CStrInCStrNoCase(s, "alloc") == s;
}
@@ -709,9 +710,8 @@
// No summary. Generate one.
const char* FName = FD->getIdentifier()->getName();
-
- RetainSummary *S = 0;
+ RetainSummary *S = 0;
FunctionType* FT = dyn_cast<FunctionType>(FD->getType());
do {