Ignore copy/move constructors for function naming checks (#4134)
* Ignore copy/move constructors for function naming checks * Also change in namingng * Add test in naming_test.cpp
This commit is contained in:
parent
e430a11b49
commit
ea3bb8b297
|
@ -81,7 +81,7 @@ for arg in sys.argv[1:]:
|
|||
for scope in cfg.scopes:
|
||||
if scope.type == 'Function':
|
||||
function = scope.function
|
||||
if function is not None and function.type in ('Constructor', 'Destructor'):
|
||||
if function is not None and function.type in ('Constructor', 'Destructor', 'CopyConstructor', 'MoveConstructor'):
|
||||
continue
|
||||
res = re.match(RE_FUNCTIONNAME, scope.className)
|
||||
if not res:
|
||||
|
|
|
@ -182,7 +182,7 @@ def process(dumpfiles, configfile, debugprint=False):
|
|||
if "RE_FUNCTIONNAME" in conf and conf["RE_FUNCTIONNAME"]:
|
||||
for token in cfg.tokenlist:
|
||||
if token.function:
|
||||
if token.function.type == 'Constructor' or token.function.type == 'Destructor':
|
||||
if token.function.type in ('Constructor', 'Destructor', 'CopyConstructor', 'MoveConstructor'):
|
||||
continue
|
||||
retval = token.previous.str
|
||||
prev = token.previous
|
||||
|
|
|
@ -6,4 +6,6 @@ class TestClass1
|
|||
{
|
||||
TestClass1() {}
|
||||
~TestClass1() {}
|
||||
TestClass1(const TestClass1 &) {}
|
||||
TestClass1(TestClass1 &&) {}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue