mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Reformat Zeek in Spicy style
This largely copies over Spicy's `.clang-format` configuration file. The one place where we deviate is header include order since Zeek depends on headers being included in a certain order.
This commit is contained in:
parent
7b8e7ed72c
commit
f5a76c1aed
786 changed files with 131714 additions and 153609 deletions
|
@ -4,26 +4,23 @@
|
|||
|
||||
#include "zeek/Reporter.h"
|
||||
|
||||
namespace zeek::detail
|
||||
{
|
||||
namespace zeek::detail {
|
||||
|
||||
TempVar::TempVar(size_t num, const TypePtr& t, ExprPtr _rhs) : type(t)
|
||||
{
|
||||
char buf[8192];
|
||||
snprintf(buf, sizeof buf, "#%zu", num);
|
||||
name = buf;
|
||||
rhs = std::move(_rhs);
|
||||
}
|
||||
TempVar::TempVar(size_t num, const TypePtr& t, ExprPtr _rhs) : type(t) {
|
||||
char buf[8192];
|
||||
snprintf(buf, sizeof buf, "#%zu", num);
|
||||
name = buf;
|
||||
rhs = std::move(_rhs);
|
||||
}
|
||||
|
||||
void TempVar::SetAlias(IDPtr _alias)
|
||||
{
|
||||
if ( alias )
|
||||
reporter->InternalError("Re-aliasing a temporary");
|
||||
void TempVar::SetAlias(IDPtr _alias) {
|
||||
if ( alias )
|
||||
reporter->InternalError("Re-aliasing a temporary");
|
||||
|
||||
if ( alias == id )
|
||||
reporter->InternalError("Creating alias loop");
|
||||
if ( alias == id )
|
||||
reporter->InternalError("Creating alias loop");
|
||||
|
||||
alias = std::move(_alias);
|
||||
}
|
||||
alias = std::move(_alias);
|
||||
}
|
||||
|
||||
} // zeek::detail
|
||||
} // namespace zeek::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue