From 61d2e4a299c097ed193ddd1313c3b32c7f0b6a1c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sun, 22 Feb 2009 07:32:24 +0000 Subject: [PATCH] Fix regression in naming convention derivation: a method only follows the copy 'rule' if it doesn't already start with 'init', etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65269 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/CFRefCount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index d8c2fb0e96..29ad73f0f9 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -120,7 +120,7 @@ static NamingConvention deriveNamingConvention(const char* s) { // Methods starting with 'alloc' or contain 'copy' follow the // create rule if ((AtBeginning && StringsEqualNoCase("alloc", s, len)) || - (StringsEqualNoCase("copy", s, len))) + (C == NoConvention && StringsEqualNoCase("copy", s, len))) C = CreateRule; else // Methods starting with 'init' follow the init rule. if (AtBeginning && StringsEqualNoCase("init", s, len)) -- 2.50.1