mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
Fix clang-tidy bugprone-branch-clone warnings
This commit is contained in:
parent
92854e95d3
commit
dbecfb5a2a
32 changed files with 132 additions and 247 deletions
|
@ -422,8 +422,7 @@ static bool is_supported_index_type(const TypePtr& t, const char** tname, std::u
|
|||
|
||||
switch ( tag ) {
|
||||
// Allow functions, since they can be compared for Func* pointer equality.
|
||||
case TYPE_FUNC: return true;
|
||||
|
||||
case TYPE_FUNC:
|
||||
case TYPE_PATTERN: return true;
|
||||
|
||||
case TYPE_RECORD: {
|
||||
|
@ -1843,7 +1842,7 @@ bool same_type(const Type& arg_t1, const Type& arg_t2, bool is_init, bool match_
|
|||
// First do all checks that don't require any recursion.
|
||||
|
||||
switch ( t1->Tag() ) {
|
||||
case TYPE_VOID:
|
||||
case TYPE_VOID: // NOLINT(bugprone-branch-clone)
|
||||
case TYPE_BOOL:
|
||||
case TYPE_INT:
|
||||
case TYPE_COUNT:
|
||||
|
@ -2143,8 +2142,7 @@ bool is_assignable(TypeTag t) {
|
|||
case TYPE_FUNC:
|
||||
case TYPE_ANY:
|
||||
case TYPE_ERROR:
|
||||
case TYPE_LIST: return true;
|
||||
|
||||
case TYPE_LIST:
|
||||
case TYPE_VECTOR:
|
||||
case TYPE_FILE:
|
||||
case TYPE_OPAQUE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue