mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/remove-unneeded-binpac-includes'
* origin/topic/timw/remove-unneeded-binpac-includes: Remove some unnecessary #includes from binpac source files
This commit is contained in:
commit
5d93254400
29 changed files with 24 additions and 55 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
||||||
|
8.1.0-dev.492 | 2025-09-02 16:00:17 -0700
|
||||||
|
|
||||||
|
* Remove some unnecessary #includes from binpac source files (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
8.1.0-dev.490 | 2025-09-02 11:47:44 -0700
|
8.1.0-dev.490 | 2025-09-02 11:47:44 -0700
|
||||||
|
|
||||||
* Fix a few more random clang-tidy findings (Tim Wojtulewicz, Corelight)
|
* Fix a few more random clang-tidy findings (Tim Wojtulewicz, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
8.1.0-dev.490
|
8.1.0-dev.492
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// See the file "COPYING" in the main distribution directory for copyright.
|
// See the file "COPYING" in the main distribution directory for copyright.
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring> // for memcpy
|
#include <cstring> // for memcpy
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "pac_paramtype.h"
|
#include "pac_paramtype.h"
|
||||||
#include "pac_state.h"
|
#include "pac_state.h"
|
||||||
#include "pac_type.h"
|
#include "pac_type.h"
|
||||||
#include "pac_varfield.h"
|
|
||||||
|
|
||||||
AnalyzerDecl::AnalyzerDecl(ID* id, DeclType decl_type, ParamList* params) : TypeDecl(id, params, new DummyType()) {
|
AnalyzerDecl::AnalyzerDecl(ID* id, DeclType decl_type, ParamList* params) : TypeDecl(id, params, new DummyType()) {
|
||||||
decl_type_ = decl_type;
|
decl_type_ = decl_type;
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "pac_expr.h"
|
#include "pac_expr.h"
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
#include "pac_number.h"
|
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_utils.h"
|
#include "pac_utils.h"
|
||||||
#include "pac_varfield.h"
|
#include "pac_varfield.h"
|
||||||
|
|
|
@ -3,15 +3,18 @@
|
||||||
#ifndef pac_cclass_h
|
#ifndef pac_cclass_h
|
||||||
#define pac_cclass_h
|
#define pac_cclass_h
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
class CClass;
|
class CClass;
|
||||||
class CClassMember;
|
class CClassMember;
|
||||||
class CClassMethod;
|
class CClassMethod;
|
||||||
class CType;
|
class CType;
|
||||||
class CVariable;
|
class CVariable;
|
||||||
|
|
||||||
typedef vector<CClassMember*> CClassMemberList;
|
using CClassMemberList = std::vector<CClassMember*>;
|
||||||
typedef vector<CClassMethod*> CClassMethodList;
|
using CClassMethodList = std::vector<CClassMethod*>;
|
||||||
typedef vector<CVariable*> CVariableList;
|
using CVariableList = std::vector<CVariable*>;
|
||||||
|
|
||||||
#include "pac_common.h"
|
#include "pac_common.h"
|
||||||
|
|
||||||
|
@ -44,7 +47,7 @@ protected:
|
||||||
|
|
||||||
class CVariable {
|
class CVariable {
|
||||||
public:
|
public:
|
||||||
CClassMember(const string& name, CType* type);
|
CVariable(const std::string& name, CType* type);
|
||||||
|
|
||||||
string name() const { return name_; }
|
string name() const { return name_; }
|
||||||
CType* type() const { return type_; }
|
CType* type() const { return type_; }
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
|
|
||||||
#include "pac_analyzer.h"
|
#include "pac_analyzer.h"
|
||||||
#include "pac_dataunit.h"
|
#include "pac_dataunit.h"
|
||||||
#include "pac_embedded.h"
|
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_expr.h"
|
|
||||||
#include "pac_flow.h"
|
#include "pac_flow.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_paramtype.h"
|
#include "pac_paramtype.h"
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#define pac_conn_h
|
#define pac_conn_h
|
||||||
|
|
||||||
#include "pac_analyzer.h"
|
#include "pac_analyzer.h"
|
||||||
#include "pac_decl.h"
|
|
||||||
|
|
||||||
class ConnDecl : public AnalyzerDecl {
|
class ConnDecl : public AnalyzerDecl {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
#include "pac_analyzer.h"
|
#include "pac_analyzer.h"
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_exttype.h"
|
|
||||||
#include "pac_flow.h"
|
#include "pac_flow.h"
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#ifndef pac_dbg_h
|
#ifndef pac_dbg_h
|
||||||
#define pac_dbg_h
|
#define pac_dbg_h
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
|
|
||||||
extern bool FLAGS_pac_debug;
|
extern bool FLAGS_pac_debug;
|
||||||
|
|
||||||
|
|
|
@ -4,16 +4,10 @@
|
||||||
|
|
||||||
#include "pac_attr.h"
|
#include "pac_attr.h"
|
||||||
#include "pac_context.h"
|
#include "pac_context.h"
|
||||||
#include "pac_dataptr.h"
|
|
||||||
#include "pac_embedded.h"
|
#include "pac_embedded.h"
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_expr.h"
|
|
||||||
#include "pac_exttype.h"
|
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_param.h"
|
|
||||||
#include "pac_record.h"
|
|
||||||
#include "pac_type.h"
|
|
||||||
#include "pac_utils.h"
|
#include "pac_utils.h"
|
||||||
|
|
||||||
DeclList* Decl::decl_list_ = nullptr;
|
DeclList* Decl::decl_list_ = nullptr;
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
|
#include "pac_let.h"
|
||||||
#include "pac_nullptr.h"
|
#include "pac_nullptr.h"
|
||||||
#include "pac_number.h"
|
#include "pac_number.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_record.h"
|
#include "pac_record.h"
|
||||||
#include "pac_regex.h"
|
#include "pac_regex.h"
|
||||||
#include "pac_strtype.h"
|
|
||||||
#include "pac_typedecl.h"
|
#include "pac_typedecl.h"
|
||||||
#include "pac_utils.h"
|
#include "pac_utils.h"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
|
|
||||||
#include "pac_decl.h"
|
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include "pac_context.h"
|
#include "pac_context.h"
|
||||||
#include "pac_dataptr.h"
|
#include "pac_dataptr.h"
|
||||||
#include "pac_dataunit.h"
|
#include "pac_dataunit.h"
|
||||||
#include "pac_embedded.h"
|
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_expr.h"
|
#include "pac_expr.h"
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_type.h"
|
|
||||||
|
|
||||||
InputBuffer::InputBuffer(Expr* expr) : DataDepElement(INPUT_BUFFER), expr_(expr) {}
|
InputBuffer::InputBuffer(Expr* expr) : DataDepElement(INPUT_BUFFER), expr_(expr) {}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "pac_common.h"
|
#include "pac_common.h"
|
||||||
#include "pac_decl.h"
|
#include "pac_decl.h"
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_exttype.h"
|
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
// NOLINTBEGIN
|
// NOLINTBEGIN
|
||||||
|
|
|
@ -7,11 +7,7 @@
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include "pac_utils.h"
|
OutputException::OutputException(const char* arg_msg) : msg(arg_msg) {}
|
||||||
|
|
||||||
OutputException::OutputException(const char* arg_msg) { msg = arg_msg; }
|
|
||||||
|
|
||||||
OutputException::~OutputException() {}
|
|
||||||
|
|
||||||
Output::Output(string filename) {
|
Output::Output(string filename) {
|
||||||
fp = fopen(filename.c_str(), "w");
|
fp = fopen(filename.c_str(), "w");
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#ifndef pac_output_h
|
#ifndef pac_output_h
|
||||||
#define pac_output_h
|
#define pac_output_h
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <cstdarg>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -12,7 +12,7 @@ using namespace std;
|
||||||
class OutputException {
|
class OutputException {
|
||||||
public:
|
public:
|
||||||
OutputException(const char* arg_msg);
|
OutputException(const char* arg_msg);
|
||||||
~OutputException();
|
~OutputException() = default;
|
||||||
const char* errmsg() const { return msg.c_str(); }
|
const char* errmsg() const { return msg.c_str(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include "pac_param.h"
|
#include "pac_param.h"
|
||||||
|
|
||||||
#include "pac_decl.h"
|
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
#include "pac_field.h"
|
#include "pac_field.h"
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include "pac_paramtype.h"
|
#include "pac_paramtype.h"
|
||||||
|
|
||||||
#include "pac_context.h"
|
|
||||||
#include "pac_dataptr.h"
|
#include "pac_dataptr.h"
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_expr.h"
|
#include "pac_expr.h"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include "pac_record.h"
|
#include "pac_record.h"
|
||||||
|
|
||||||
#include "pac_attr.h"
|
|
||||||
#include "pac_dataptr.h"
|
#include "pac_dataptr.h"
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_expr.h"
|
#include "pac_expr.h"
|
||||||
|
@ -12,7 +11,6 @@
|
||||||
#include "pac_type.h"
|
#include "pac_type.h"
|
||||||
#include "pac_typedecl.h"
|
#include "pac_typedecl.h"
|
||||||
#include "pac_utils.h"
|
#include "pac_utils.h"
|
||||||
#include "pac_varfield.h"
|
|
||||||
|
|
||||||
RecordType::RecordType(RecordFieldList* record_fields) : Type(RECORD) {
|
RecordType::RecordType(RecordFieldList* record_fields) : Type(RECORD) {
|
||||||
// Here we assume that the type is a standalone type.
|
// Here we assume that the type is a standalone type.
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "pac_common.h"
|
#include "pac_common.h"
|
||||||
#include "pac_field.h"
|
#include "pac_field.h"
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
#include "pac_let.h"
|
|
||||||
#include "pac_type.h"
|
#include "pac_type.h"
|
||||||
|
|
||||||
class RecordType : public Type {
|
class RecordType : public Type {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_expr.h"
|
#include "pac_expr.h"
|
||||||
#include "pac_func.h"
|
#include "pac_func.h"
|
||||||
#include "pac_record.h"
|
|
||||||
#include "pac_type.h"
|
#include "pac_type.h"
|
||||||
#include "pac_typedecl.h"
|
#include "pac_typedecl.h"
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_type.h"
|
|
||||||
|
|
||||||
// Depends on the regular expression library we are using
|
// Depends on the regular expression library we are using
|
||||||
const char* RegEx::kREMatcherType = "RegExMatcher";
|
const char* RegEx::kREMatcherType = "RegExMatcher";
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
|
|
||||||
#include "pac_type.h"
|
#include "pac_type.h"
|
||||||
|
|
||||||
#include "pac_action.h"
|
|
||||||
#include "pac_array.h"
|
#include "pac_array.h"
|
||||||
#include "pac_attr.h"
|
#include "pac_attr.h"
|
||||||
#include "pac_btype.h"
|
#include "pac_btype.h"
|
||||||
#include "pac_context.h"
|
|
||||||
#include "pac_dataptr.h"
|
#include "pac_dataptr.h"
|
||||||
#include "pac_decl.h"
|
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_expr.h"
|
#include "pac_expr.h"
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
|
@ -18,6 +15,7 @@
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_paramtype.h"
|
#include "pac_paramtype.h"
|
||||||
#include "pac_strtype.h"
|
#include "pac_strtype.h"
|
||||||
|
#include "pac_typedecl.h"
|
||||||
#include "pac_utils.h"
|
#include "pac_utils.h"
|
||||||
#include "pac_varfield.h"
|
#include "pac_varfield.h"
|
||||||
#include "pac_withinput.h"
|
#include "pac_withinput.h"
|
||||||
|
|
|
@ -5,16 +5,15 @@
|
||||||
#include "pac_attr.h"
|
#include "pac_attr.h"
|
||||||
#include "pac_context.h"
|
#include "pac_context.h"
|
||||||
#include "pac_dataptr.h"
|
#include "pac_dataptr.h"
|
||||||
#include "pac_embedded.h"
|
|
||||||
#include "pac_enum.h"
|
#include "pac_enum.h"
|
||||||
#include "pac_exception.h"
|
#include "pac_exception.h"
|
||||||
#include "pac_expr.h"
|
#include "pac_expr.h"
|
||||||
#include "pac_exttype.h"
|
#include "pac_exttype.h"
|
||||||
#include "pac_id.h"
|
#include "pac_id.h"
|
||||||
|
#include "pac_let.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_param.h"
|
#include "pac_param.h"
|
||||||
#include "pac_paramtype.h"
|
#include "pac_paramtype.h"
|
||||||
#include "pac_record.h"
|
|
||||||
#include "pac_type.h"
|
#include "pac_type.h"
|
||||||
#include "pac_utils.h"
|
#include "pac_utils.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
// See the file "COPYING" in the main distribution directory for copyright.
|
|
||||||
|
|
||||||
#include "pac_varfield.h"
|
|
||||||
|
|
||||||
void PrivVarField::Prepare(Env* env) { Field::Prepare(env); }
|
|
|
@ -18,7 +18,7 @@ class PubVarField : public Field {
|
||||||
public:
|
public:
|
||||||
PubVarField(ID* id, Type* type)
|
PubVarField(ID* id, Type* type)
|
||||||
: Field(PUB_VAR_FIELD, TYPE_NOT_TO_BE_PARSED | CLASS_MEMBER | PUBLIC_READABLE, id, type) {}
|
: Field(PUB_VAR_FIELD, TYPE_NOT_TO_BE_PARSED | CLASS_MEMBER | PUBLIC_READABLE, id, type) {}
|
||||||
~PubVarField() override {}
|
~PubVarField() override = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
// A private variable
|
// A private variable
|
||||||
|
@ -26,7 +26,7 @@ class PrivVarField : public Field {
|
||||||
public:
|
public:
|
||||||
PrivVarField(ID* id, Type* type)
|
PrivVarField(ID* id, Type* type)
|
||||||
: Field(PRIV_VAR_FIELD, TYPE_NOT_TO_BE_PARSED | CLASS_MEMBER | NOT_PUBLIC_READABLE, id, type) {}
|
: Field(PRIV_VAR_FIELD, TYPE_NOT_TO_BE_PARSED | CLASS_MEMBER | NOT_PUBLIC_READABLE, id, type) {}
|
||||||
~PrivVarField() override {}
|
~PrivVarField() override = default;
|
||||||
|
|
||||||
void GenPubDecls(Output* out, Env* env) override { /* do nothing */ }
|
void GenPubDecls(Output* out, Env* env) override { /* do nothing */ }
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ public:
|
||||||
class TempVarField : public Field {
|
class TempVarField : public Field {
|
||||||
public:
|
public:
|
||||||
TempVarField(ID* id, Type* type) : Field(TEMP_VAR_FIELD, TYPE_NOT_TO_BE_PARSED | NOT_CLASS_MEMBER, id, type) {}
|
TempVarField(ID* id, Type* type) : Field(TEMP_VAR_FIELD, TYPE_NOT_TO_BE_PARSED | NOT_CLASS_MEMBER, id, type) {}
|
||||||
~TempVarField() override {}
|
~TempVarField() override = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // pac_varfield_h
|
#endif // pac_varfield_h
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include "pac_withinput.h"
|
#include "pac_withinput.h"
|
||||||
|
|
||||||
#include "pac_dataptr.h"
|
|
||||||
#include "pac_expr.h"
|
|
||||||
#include "pac_inputbuf.h"
|
#include "pac_inputbuf.h"
|
||||||
#include "pac_output.h"
|
#include "pac_output.h"
|
||||||
#include "pac_type.h"
|
#include "pac_type.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue