mirror of
https://github.com/zeek/zeek.git
synced 2025-10-01 22:28:20 +00:00
gen-zam: Fix clang-tidy bugprone-branch-clone warnings in headers
This commit is contained in:
parent
53591cf205
commit
0acd4bf04e
1 changed files with 7 additions and 0 deletions
|
@ -2630,6 +2630,10 @@ void ZAMGen::InitEmitTargets()
|
|||
gen_files[gfn.first] = f;
|
||||
}
|
||||
|
||||
// Avoid bugprone-branch-clone warnings from clang-tidy in generated code.
|
||||
Emit(OpName, "// NOLINTBEGIN(bugprone-branch-clone)");
|
||||
Emit(Eval, "// NOLINTBEGIN(bugprone-branch-clone)");
|
||||
|
||||
InitSwitch(C1Def, "C1 assignment");
|
||||
InitSwitch(C2Def, "C2 assignment");
|
||||
InitSwitch(C3Def, "C3 assignment");
|
||||
|
@ -2652,6 +2656,9 @@ void ZAMGen::CloseEmitTargets()
|
|||
{
|
||||
FinishSwitches();
|
||||
|
||||
Emit(OpName, "// NOLINTEND(bugprone-branch-clone)");
|
||||
Emit(Eval, "// NOLINTEND(bugprone-branch-clone)");
|
||||
|
||||
for ( auto& gf : gen_files )
|
||||
fclose(gf.second);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue