astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2020-12-22 08:09:26 +01:00
parent 2ecab32fbe
commit 13ed2effa1
2 changed files with 5 additions and 5 deletions

View File

@ -2454,9 +2454,9 @@ void CheckClass::checkDuplInheritedMembersRecursive(const Type* typeCurrent, con
for (const Variable &parentClassVarIt : parentClassIt.type->classScope->varlist) {
if (classVarIt.name() == parentClassVarIt.name() && !parentClassVarIt.isPrivate()) { // Check if the class and its parent have a common variable
duplInheritedMembersError(classVarIt.nameToken(), parentClassVarIt.nameToken(),
typeCurrent->name(), parentClassIt.type->name(), classVarIt.name(),
typeCurrent->classScope->type == Scope::eStruct,
parentClassIt.type->classScope->type == Scope::eStruct);
typeCurrent->name(), parentClassIt.type->name(), classVarIt.name(),
typeCurrent->classScope->type == Scope::eStruct,
parentClassIt.type->classScope->type == Scope::eStruct);
}
}
}

View File

@ -567,9 +567,9 @@ private:
" int j;\n"
"};\n"
"class Derived2 : public Derived1 {\n"
" int i;\n"
" int i;\n"
"};");
ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:10]: (warning) The class 'Derived2' defines member variable with name 'i' also defined in its parent class 'Base'.\n", errout.str());
ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:10]: (warning) The class 'Derived2' defines member variable with name 'i' also defined in its parent class 'Base'.\n", errout.str());
}