The following issues were found

src/mongo/db/exec/sbe/expressions/sbe_is_array_empty_builtin_test.cpp
1 issues
syntax error
Error

Line: 63

                  }
};

TEST_F(SBEBuiltinIsArrayEmptyTest, Array) {
    for (auto makeArrayFn : {makeBsonArray, makeArray, makeArraySet}) {
        auto emptyArray = makeArrayFn(BSONArray());
        value::ValueGuard emptyArrayGuard{emptyArray};

        runAndAssertExpression(emptyArray, makeBool(true));

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_is_member_builtin_test.cpp
1 issues
syntax error
Error

Line: 53

                  }
};

TEST_F(SBEBuiltinIsMemberTest, IsMemberArraySet) {
    value::OwnedValueAccessor inputSlotAccessor;
    auto inputSlot = bindAccessor(&inputSlotAccessor);

    // Test that isMember can find basic values.
    inputSlotAccessor.reset(value::TypeTags::NumberInt32, value::bitcastFrom<int32_t>(1));

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_iso_date_to_parts_test.cpp
1 issues
syntax error
Error

Line: 87

                  }
};

TEST_F(SBEIsoDateToPartsTest, BasicIsoDateToParts) {
    value::OwnedValueAccessor timezoneDBAccessor;
    auto timezoneDBSlot = bindAccessor(&timezoneDBAccessor);
    value::OwnedValueAccessor dateAccessor;
    auto dateSlot = bindAccessor(&dateAccessor);
    value::OwnedValueAccessor timezoneAccessor;

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_mod_expression_test.cpp
1 issues
syntax error
Error

Line: 79

                  }
};

TEST_F(SBEModExprTest, ComputesMod) {
    value::OwnedValueAccessor slotAccessor1, slotAccessor2;
    auto argSlot1 = bindAccessor(&slotAccessor1);
    auto argSlot2 = bindAccessor(&slotAccessor2);
    auto modExpr = sbe::makeE<sbe::EFunction>(
        "mod", sbe::makeEs(makeE<EVariable>(argSlot1), makeE<EVariable>(argSlot2)));

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_new_array_from_range_builtin_test.cpp
1 issues
syntax error
Error

Line: 72

                  }
};

TEST_F(SBEBuiltinNewArrayFromRangeTest, PositiveRange) {
    auto expectedRes = makeArray(BSON_ARRAY(1 << 2 << 3));

    auto start = makeInt32(1);
    auto end = makeInt32(4);
    auto step = makeInt32(1);

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_regex_test.cpp
1 issues
syntax error
Error

Line: 119

                  }
};

TEST_F(SBERegexTest, ComputesRegexCompile) {
    value::OwnedValueAccessor slotAccessor1;
    value::OwnedValueAccessor slotAccessor2;
    auto patternSlot = bindAccessor(&slotAccessor1);
    auto optionsSlot = bindAccessor(&slotAccessor2);
    auto regexExpr = sbe::makeE<sbe::EFunction>(

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_replace_one_expression_test.cpp
1 issues
syntax error
Error

Line: 64

                  }
};

TEST_F(SBEReplaceOneExprTest, EmptyStrings) {
    value::OwnedValueAccessor inputAccessor, findAccessor, replaceAccessor;
    auto inputSlot = bindAccessor(&inputAccessor);
    auto findSlot = bindAccessor(&findAccessor);
    auto replaceSlot = bindAccessor(&replaceAccessor);
    auto replaceOneExpr = sbe::makeE<sbe::EFunction>("replaceOne",

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_reverse_array_builtin_test.cpp
1 issues
syntax error
Error

Line: 68

                  }
};

TEST_F(SBEBuiltinReverseArrayTest, Array) {
    for (auto makeArrayFn : {makeBsonArray, makeArray}) {
        auto testArray = makeArrayFn(BSON_ARRAY(1 << 2 << 3));
        value::ValueGuard testArrayGuard{testArray};

        auto expectedResult = makeArray(BSON_ARRAY(3 << 2 << 1));

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_set_expressions_test.cpp
1 issues
syntax error
Error

Line: 57

                  }
};

TEST_F(SBEBuiltinSetOpTest, ComputesSetUnion) {
    value::OwnedValueAccessor slotAccessor1, slotAccessor2;
    auto arrSlot1 = bindAccessor(&slotAccessor1);
    auto arrSlot2 = bindAccessor(&slotAccessor2);
    auto setUnionExpr = sbe::makeE<sbe::EFunction>(
        "setUnion", sbe::makeEs(makeE<EVariable>(arrSlot1), makeE<EVariable>(arrSlot2)));

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/expressions/sbe_shard_filter_builtin_test.cpp
1 issues
syntax error
Error

Line: 82

                  }
};

TEST_F(SbeShardFilterBuiltinTest, BasicFiltering) {
    value::ViewOfValueAccessor objAccessor;
    auto objSlot = bindAccessor(&objAccessor);

    BSONObj emptyBson;
    objAccessor.reset(value::TypeTags::bsonObject,

            

Reported by Cppcheck.