[cfe-commits] r65269 - /cfe/trunk/lib/Analysis/CFRefCount.cpp

Ted Kremenek kremenek at apple.com
Sat Feb 21 23:32:24 PST 2009


Author: kremenek
Date: Sun Feb 22 01:32:24 2009
New Revision: 65269

URL: http://llvm.org/viewvc/llvm-project?rev=65269&view=rev
Log:
Fix regression in naming convention derivation: a method only follows the copy 'rule' if it doesn't already start with 'init', etc.

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=65269&r1=65268&r2=65269&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Sun Feb 22 01:32:24 2009
@@ -120,7 +120,7 @@
       // 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))





More information about the cfe-commits mailing list