mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
clang-format: Set IndentCaseBlocks to false
This commit is contained in:
parent
02206f3215
commit
4423574d26
58 changed files with 4729 additions and 4766 deletions
|
@ -36,11 +36,11 @@ const ZAMStmt ZAMCompiler::CompileStmt(const Stmt* s)
|
|||
return CompileDel(static_cast<const DelStmt*>(s));
|
||||
|
||||
case STMT_EVENT:
|
||||
{
|
||||
auto es = static_cast<const EventStmt*>(s);
|
||||
auto e = static_cast<const EventExpr*>(es->StmtExpr());
|
||||
return CompileExpr(e);
|
||||
}
|
||||
{
|
||||
auto es = static_cast<const EventStmt*>(s);
|
||||
auto e = static_cast<const EventExpr*>(es->StmtExpr());
|
||||
return CompileExpr(e);
|
||||
}
|
||||
|
||||
case STMT_WHILE:
|
||||
return CompileWhile(static_cast<const WhileStmt*>(s));
|
||||
|
@ -67,12 +67,12 @@ const ZAMStmt ZAMCompiler::CompileStmt(const Stmt* s)
|
|||
return CompileWhen(static_cast<const WhenStmt*>(s));
|
||||
|
||||
case STMT_CHECK_ANY_LEN:
|
||||
{
|
||||
auto cs = static_cast<const CheckAnyLenStmt*>(s);
|
||||
auto n = cs->StmtExpr()->AsNameExpr();
|
||||
auto expected_len = cs->ExpectedLen();
|
||||
return CheckAnyLenVi(n, expected_len);
|
||||
}
|
||||
{
|
||||
auto cs = static_cast<const CheckAnyLenStmt*>(s);
|
||||
auto n = cs->StmtExpr()->AsNameExpr();
|
||||
auto expected_len = cs->ExpectedLen();
|
||||
return CheckAnyLenVi(n, expected_len);
|
||||
}
|
||||
|
||||
case STMT_NEXT:
|
||||
return CompileNext();
|
||||
|
@ -520,29 +520,29 @@ const ZAMStmt ZAMCompiler::ValueSwitch(const SwitchStmt* sw, const NameExpr* v,
|
|||
break;
|
||||
|
||||
case TYPE_INTERNAL_STRING:
|
||||
{
|
||||
// This leaks, but only statically so not worth
|
||||
// tracking the value for ultimate deletion.
|
||||
auto sv = cv->AsString()->Render();
|
||||
std::string s(sv);
|
||||
new_str_cases[s] = case_body_start;
|
||||
delete[] sv;
|
||||
break;
|
||||
}
|
||||
{
|
||||
// This leaks, but only statically so not worth
|
||||
// tracking the value for ultimate deletion.
|
||||
auto sv = cv->AsString()->Render();
|
||||
std::string s(sv);
|
||||
new_str_cases[s] = case_body_start;
|
||||
delete[] sv;
|
||||
break;
|
||||
}
|
||||
|
||||
case TYPE_INTERNAL_ADDR:
|
||||
{
|
||||
auto a = cv->AsAddr().AsString();
|
||||
new_str_cases[a] = case_body_start;
|
||||
break;
|
||||
}
|
||||
{
|
||||
auto a = cv->AsAddr().AsString();
|
||||
new_str_cases[a] = case_body_start;
|
||||
break;
|
||||
}
|
||||
|
||||
case TYPE_INTERNAL_SUBNET:
|
||||
{
|
||||
auto n = cv->AsSubNet().AsString();
|
||||
new_str_cases[n] = case_body_start;
|
||||
break;
|
||||
}
|
||||
{
|
||||
auto n = cv->AsSubNet().AsString();
|
||||
new_str_cases[n] = case_body_start;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
reporter->InternalError("bad recovered type when compiling switch");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue