Fix regression in naming convention derivation: a method only follows the copy 'rule' if it doesn't already start with 'init', etc.

llvm-svn: 65269
This commit is contained in:
Ted Kremenek 2009-02-22 07:32:24 +00:00
parent 69decbf0b2
commit 35251f3d92
1 changed files with 1 additions and 1 deletions

View 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))