Running astyle [ci skip].
This commit is contained in:
parent
dd05839a7e
commit
1e0f8ae9b4
|
@ -1423,7 +1423,9 @@ bool isConstVarExpression(const Token *tok, const char* skipMatch)
|
|||
if (Token::simpleMatch(tok->astOperand1(), ".") && !isConstVarExpression(tok->astOperand1(), skipMatch))
|
||||
return false;
|
||||
std::vector<const Token *> args = getArguments(tok);
|
||||
return std::all_of(args.begin(), args.end(), [&](const Token* t) { return isConstVarExpression(t, skipMatch); });
|
||||
return std::all_of(args.begin(), args.end(), [&](const Token* t) {
|
||||
return isConstVarExpression(t, skipMatch);
|
||||
});
|
||||
}
|
||||
if (isCPPCast(tok)) {
|
||||
return isConstVarExpression(tok->astOperand2(), skipMatch);
|
||||
|
|
|
@ -2637,8 +2637,8 @@ void CheckClass::checkAccessModifierVirtualFunctions()
|
|||
continue;
|
||||
for (const Function &func : classScope->functionList) {
|
||||
const Function *baseFunc = func.getOverriddenFunction();
|
||||
if(baseFunc) {
|
||||
if(AccessControl::Public == baseFunc->access && AccessControl::Public != func.access) {
|
||||
if (baseFunc) {
|
||||
if (AccessControl::Public == baseFunc->access && AccessControl::Public != func.access) {
|
||||
checkAccessModifierVirtualFunctionsError(func.tokenDef, func.name());
|
||||
}
|
||||
}
|
||||
|
@ -2649,10 +2649,10 @@ void CheckClass::checkAccessModifierVirtualFunctions()
|
|||
void CheckClass::checkAccessModifierVirtualFunctionsError(const Token *tok, const std::string& func)
|
||||
{
|
||||
reportError(tok, Severity::style, "hidingInheritedPublic",
|
||||
"$symbol:" + func + "\n"
|
||||
"The function '$symbol' has more narrow access modifier in a derived class. It could violate a LSP principle.",
|
||||
CWE(0U) /* Unknown CWE! */,
|
||||
false);
|
||||
"$symbol:" + func + "\n"
|
||||
"The function '$symbol' has more narrow access modifier in a derived class. It could violate a LSP principle.",
|
||||
CWE(0U) /* Unknown CWE! */,
|
||||
false);
|
||||
}
|
||||
|
||||
void CheckClass::checkUnsafeClassRefMember()
|
||||
|
|
|
@ -1074,7 +1074,8 @@ private:
|
|||
}
|
||||
|
||||
void iterator24()
|
||||
{ // #9556
|
||||
{
|
||||
// #9556
|
||||
check("void f(int a, int b) {\n"
|
||||
" if (&a == &b) {}\n"
|
||||
"}\n");
|
||||
|
|
Loading…
Reference in New Issue