diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-02-22 07:32:24 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-02-22 07:32:24 +0000 |
commit | 61d2e4a299c097ed193ddd1313c3b32c7f0b6a1c (patch) | |
tree | ac64d050817a90cdbef4e84cc3df1ae2796c3b9e /lib/Analysis/CFRefCount.cpp | |
parent | ddd2b6e1e7406ab45f71398fb78b86c36acd789b (diff) |
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
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |