analysis: fix format

This commit is contained in:
Yoichi Hirai 2017-01-23 14:51:17 +01:00
parent 8dc306d62b
commit 399b7b695a
No known key found for this signature in database
GPG Key ID: E7B75D080FCF7992

View File

@ -42,9 +42,10 @@ Declaration const* DeclarationContainer::conflictingDeclaration(
if (m_invisibleDeclarations.count(*_name)) if (m_invisibleDeclarations.count(*_name))
declarations += m_invisibleDeclarations.at(*_name); declarations += m_invisibleDeclarations.at(*_name);
if (dynamic_cast<FunctionDefinition const*>(&_declaration) || if (
dynamic_cast<FunctionDefinition const*>(&_declaration) ||
dynamic_cast<EventDefinition const*>(&_declaration) dynamic_cast<EventDefinition const*>(&_declaration)
) )
{ {
// check that all other declarations with the same name are functions or a public state variable or events. // check that all other declarations with the same name are functions or a public state variable or events.
// And then check that the signatures are different. // And then check that the signatures are different.
@ -56,8 +57,10 @@ Declaration const* DeclarationContainer::conflictingDeclaration(
continue; continue;
return declaration; return declaration;
} }
if (!dynamic_cast<FunctionDefinition const*>(declaration) && if (
!dynamic_cast<EventDefinition const*>(declaration)) !dynamic_cast<FunctionDefinition const*>(declaration) &&
!dynamic_cast<EventDefinition const*>(declaration)
)
return declaration; return declaration;
// Or, continue. // Or, continue.
} }