From 0b6b0e7157d35b565d2840c94a816c18c9036d0d Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 2 Jun 2008 17:14:13 +0000 Subject: Teach the CF retain checker about "_init" methods. Fixes: llvm-svn: 51872 --- clang/lib/Analysis/CFRefCount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Analysis/CFRefCount.cpp') diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 5660929a879..24971edcdde 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -607,7 +607,7 @@ RetainSummaryManager::getMethodSummary(ObjCMessageExpr* ME) { const char* s = S.getIdentifierInfoForSlot(0)->getName(); assert (ScratchArgs.empty()); - if (strncmp(s, "init", 4) == 0) + if (strncmp(s, "init", 4) == 0 || strncmp(s, "_init", 5) == 0) return getInitMethodSummary(S); // "copyXXX", "createXXX", "newXXX": allocators. -- cgit v1.2.3