mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
low-level tidying
This commit is contained in:
parent
415bbe17d6
commit
772169f8e0
3 changed files with 3 additions and 4 deletions
|
@ -15,7 +15,6 @@
|
||||||
#include "zeek/plugin/Manager.h"
|
#include "zeek/plugin/Manager.h"
|
||||||
|
|
||||||
zeek::EventMgr zeek::event_mgr;
|
zeek::EventMgr zeek::event_mgr;
|
||||||
zeek::EventMgr& mgr = zeek::event_mgr;
|
|
||||||
|
|
||||||
namespace zeek
|
namespace zeek
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ public:
|
||||||
|
|
||||||
const char* Name() const { return name.data(); }
|
const char* Name() const { return name.data(); }
|
||||||
|
|
||||||
const FuncPtr& GetFunc() { return local; }
|
const FuncPtr& GetFunc() const { return local; }
|
||||||
|
|
||||||
const FuncTypePtr& GetType(bool check_export = true);
|
const FuncTypePtr& GetType(bool check_export = true);
|
||||||
|
|
||||||
|
|
|
@ -124,11 +124,11 @@ bool UseDefs::RemoveUnused(int iter)
|
||||||
// Because we're dealing with reduced statements, the
|
// Because we're dealing with reduced statements, the
|
||||||
// assignment expression should be to a simple variable.
|
// assignment expression should be to a simple variable.
|
||||||
if ( r->Tag() != EXPR_REF )
|
if ( r->Tag() != EXPR_REF )
|
||||||
reporter->InternalError("lhs ref inconsistency in UseDefs::FindUnused");
|
reporter->InternalError("lhs ref inconsistency in UseDefs::RemoveUnused");
|
||||||
|
|
||||||
auto n = r->AsRefExprPtr()->GetOp1();
|
auto n = r->AsRefExprPtr()->GetOp1();
|
||||||
if ( n->Tag() != EXPR_NAME )
|
if ( n->Tag() != EXPR_NAME )
|
||||||
reporter->InternalError("lhs name inconsistency in UseDefs::FindUnused");
|
reporter->InternalError("lhs name inconsistency in UseDefs::RemoveUnused");
|
||||||
|
|
||||||
auto id = n->AsNameExpr()->Id();
|
auto id = n->AsNameExpr()->Id();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue