Kaydet (Commit) aa7a829e authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:staticfunction

Change-Id: Id796b799f8e2fcc3eae98d43800c5e31fec27fef
üst 44790193
......@@ -1046,7 +1046,7 @@ private:
virtual sal_uInt32 checkInheritedMemberCount() const SAL_OVERRIDE
{ return BaseOffset(m_typeMgr, entity_).get(); }
void dumpExceptionSpecification(
static void dumpExceptionSpecification(
FileStream & out, std::vector< OUString > const & exceptions,
bool runtimeException);
......
......@@ -134,11 +134,11 @@ private:
rtl::OUString const & name,
rtl::Reference< unoidl::Entity > const & entity);
css::uno::Any getEnumMember(
static css::uno::Any getEnumMember(
rtl::Reference< unoidl::EnumTypeEntity > const & entity,
rtl::OUString const & member);
css::uno::Any getConstant(
static css::uno::Any getConstant(
rtl::OUString const & constantGroupName,
rtl::Reference< unoidl::ConstantGroupEntity > const & entity,
rtl::OUString const & member);
......
......@@ -62,7 +62,7 @@ private:
OUString SAL_CALL quotedPValue( );
OUString SAL_CALL nonquotedPValue( );
void SAL_CALL comment( void );
bool SAL_CALL isInRange( const OUString& aChr, const OUString& aRange );
static bool SAL_CALL isInRange( const OUString& aChr, const OUString& aRange );
private:
::osl::Mutex m_aMutex;
......
......@@ -175,7 +175,7 @@ private:
void setupDataPath();
void setup();
void teardown();
static void teardown();
};
namespace {
......
......@@ -90,41 +90,41 @@ class ErrorHandler
{
public:
// Report errors with varying numbers of arguments
void error0(ErrorCode e);
void error1(ErrorCode e, AstDeclaration const * d);
void error2(
static void error0(ErrorCode e);
static void error1(ErrorCode e, AstDeclaration const * d);
static void error2(
ErrorCode e, AstDeclaration const * d1, AstDeclaration const * d2);
void error3(ErrorCode e, AstDeclaration* d1, AstDeclaration* d2, AstDeclaration* d3);
static void error3(ErrorCode e, AstDeclaration* d1, AstDeclaration* d2, AstDeclaration* d3);
// Warning
void warning0(WarningCode e, const sal_Char* warningmsg);
static void warning0(WarningCode e, const sal_Char* warningmsg);
// Report a syntax error in IDL input
void syntaxError(ParseState state, sal_Int32 lineNumber, const sal_Char* errmsg);
static void syntaxError(ParseState state, sal_Int32 lineNumber, const sal_Char* errmsg);
// Report an unsuccessful coercion attempt
void coercionError(AstExpression *pExpr, ExprType et);
static void coercionError(AstExpression *pExpr, ExprType et);
// Report a failed name lookup attempt
void lookupError(const OString& n);
static void lookupError(const OString& n);
// Report a failed name lookup attempt
void lookupError(ErrorCode e, const OString& n, AstDeclaration* pScope);
static void lookupError(ErrorCode e, const OString& n, AstDeclaration* pScope);
// Report a type error
void noTypeError(AstDeclaration const * pDecl);
static void noTypeError(AstDeclaration const * pDecl);
void inheritanceError(NodeType nodeType, const OString* name, AstDeclaration* pDecl);
static void inheritanceError(NodeType nodeType, const OString* name, AstDeclaration* pDecl);
void flagError(ErrorCode e, sal_uInt32 flag);
static void flagError(ErrorCode e, sal_uInt32 flag);
void forwardLookupError(const AstDeclaration* pForward, const OString& name);
static void forwardLookupError(const AstDeclaration* pForward, const OString& name);
void constantExpected(AstDeclaration* pDecl, const OString& name);
static void constantExpected(AstDeclaration* pDecl, const OString& name);
void evalError(AstExpression* pExpr);
static void evalError(AstExpression* pExpr);
bool checkPublished(AstDeclaration const * decl, bool bOptiional=false);
static bool checkPublished(AstDeclaration const * decl, bool bOptiional=false);
};
#endif // INCLUDED_IDLC_INC_IDLC_ERRORHANDLER_HXX
......
......@@ -47,7 +47,7 @@ public:
bool initOptions(std::vector< std::string > & rArgs)
throw(IllegalArgument);
bool badOption(char const * reason, std::string const & rArg)
static bool badOption(char const * reason, std::string const & rArg)
throw(IllegalArgument);
bool setOption(char const * option, std::string const & rArg);
......
......@@ -1088,7 +1088,7 @@ AstExprValue* AstExpression::eval_symbol(EvalKind ek)
*/
if (m_pSymbolicName == NULL)
{
idlc()->error()->evalError(this);
ErrorHandler::evalError(this);
return NULL;
}
/*
......@@ -1098,7 +1098,7 @@ AstExprValue* AstExpression::eval_symbol(EvalKind ek)
pScope = idlc()->scopes()->topNonNull();
if ( !pScope )
{
idlc()->error()->lookupError(*m_pSymbolicName);
ErrorHandler::lookupError(*m_pSymbolicName);
return NULL;
}
/*
......@@ -1107,7 +1107,7 @@ AstExprValue* AstExpression::eval_symbol(EvalKind ek)
pDecl = pScope->lookupByName(*m_pSymbolicName);
if (pDecl == NULL)
{
idlc()->error()->lookupError(*m_pSymbolicName);
ErrorHandler::lookupError(*m_pSymbolicName);
return NULL;
}
/*
......@@ -1116,10 +1116,10 @@ AstExprValue* AstExpression::eval_symbol(EvalKind ek)
if (pDecl->getNodeType() != NT_const &&
pDecl->getNodeType() != NT_enum_val)
{
idlc()->error()->constantExpected(pDecl, *m_pSymbolicName);
ErrorHandler::constantExpected(pDecl, *m_pSymbolicName);
return NULL;
}
if (!idlc()->error()->checkPublished(pDecl))
if (!ErrorHandler::checkPublished(pDecl))
{
return NULL;
}
......
......@@ -48,7 +48,7 @@ AstDeclaration* AstScope::addDeclaration(AstDeclaration* pDecl)
{
if ( pDecl->hasAncestor(pDeclaration) )
{
idlc()->error()->error2(EIDL_REDEF_SCOPE, pDecl, pDeclaration);
ErrorHandler::error2(EIDL_REDEF_SCOPE, pDecl, pDeclaration);
return NULL;
}
if ( (pDecl->getNodeType() == pDeclaration->getNodeType()) &&
......@@ -75,7 +75,7 @@ AstDeclaration* AstScope::addDeclaration(AstDeclaration* pDecl)
return pDecl;
}
idlc()->error()->error2(EIDL_REDEF_SCOPE, scopeAsDecl(this), pDecl);
ErrorHandler::error2(EIDL_REDEF_SCOPE, scopeAsDecl(this), pDecl);
return NULL;
}
......@@ -221,7 +221,7 @@ AstDeclaration* AstScope::lookupInInherited(const OString& scopedName) const
// Can't look in an interface which was not yet defined
if ( !pInterface->getScope() )
{
idlc()->error()->forwardLookupError(pInterface, scopedName);
ErrorHandler::forwardLookupError(pInterface, scopedName);
}
// OK, loop through inherited interfaces. Stop when you find it
......
......@@ -55,7 +55,7 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
}
if ( !pDecl->isType() )
{
idlc()->error()->noTypeError(pDecl);
ErrorHandler::noTypeError(pDecl);
return NULL;
}
pType = static_cast<const AstType*>(pDecl);
......@@ -92,20 +92,20 @@ void FeInheritanceHeader::initializeInherits(OString* pInherits)
|| static_cast< AstInterface const * >(
resolved)->isDefined()) )
{
if ( idlc()->error()->checkPublished( pDecl ) )
if ( ErrorHandler::checkPublished( pDecl ) )
{
m_pInherits = pDecl;
}
}
else
{
idlc()->error()->inheritanceError(
ErrorHandler::inheritanceError(
getNodeType(), getName(), pDecl);
}
}
else
{
idlc()->error()->lookupError(*pInherits);
ErrorHandler::lookupError(*pInherits);
}
}
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment