]> granicus.if.org Git - clang/commitdiff
Fix regression in naming convention derivation: a method only follows the copy 'rule...
authorTed Kremenek <kremenek@apple.com>
Sun, 22 Feb 2009 07:32:24 +0000 (07:32 +0000)
committerTed Kremenek <kremenek@apple.com>
Sun, 22 Feb 2009 07:32:24 +0000 (07:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65269 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index d8c2fb0e966f04bb7f3522f642762bd0d50dd784..29ad73f0f90a5ead67c74631c8e6a8cffaf72c13 100644 (file)
@@ -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))