The following issues were found

Userland/Libraries/LibJS/Runtime/ReflectObject.cpp
1 issues
syntax error
Error

Line: 51

              }

// 28.1.1 Reflect.apply ( target, thisArgument, argumentsList ), https://tc39.es/ecma262/#sec-reflect.apply
JS_DEFINE_NATIVE_FUNCTION(ReflectObject::apply)
{
    auto target = vm.argument(0);
    auto this_argument = vm.argument(1);
    auto arguments_list = vm.argument(2);


            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
1 issues
syntax error
Error

Line: 106

              }

// 22.2.4.2 get RegExp [ @@species ], https://tc39.es/ecma262/#sec-get-regexp-@@species
JS_DEFINE_NATIVE_GETTER(RegExpConstructor::symbol_species_getter)
{
    return vm.this_value(global_object);
}

}

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/RegExpPrototype.cpp
1 issues
There is an unknown macro here somewhere. Configuration is required. If JS_ENUMERATE_REGEXP_FLAGS is a macro then please configure it.
Error

Line: 382

                      return {};                                               \
    if (flag_##flag_name.to_boolean())                           \
        builder.append(#flag_char);
    JS_ENUMERATE_REGEXP_FLAGS
#undef __JS_ENUMERATE

    return js_string(vm, builder.to_string());
}


            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/RegExpStringIteratorPrototype.cpp
1 issues
syntax error
Error

Line: 34

              }

// 22.2.7.2.1 %RegExpStringIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%regexpstringiteratorprototype%.next
JS_DEFINE_NATIVE_FUNCTION(RegExpStringIteratorPrototype::next)
{
    // For details, see the 'closure' of: https://tc39.es/ecma262/#sec-createregexpstringiterator
    auto this_value = vm.this_value(global_object);
    if (!this_value.is_object() || !is<RegExpStringIterator>(this_value.as_object())) {
        vm.throw_exception<TypeError>(global_object, ErrorType::NotA, "RegExp String Iterator");

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
1 issues
syntax error
Error

Line: 78

              }

// 24.2.2.2 get Set [ @@species ], https://tc39.es/ecma262/#sec-get-set-@@species
JS_DEFINE_NATIVE_GETTER(SetConstructor::symbol_species_getter)
{
    return vm.this_value(global_object);
}

}

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/SetIteratorPrototype.cpp
1 issues
syntax error
Error

Line: 38

              }

// 24.2.5.2.1 %SetIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%setiteratorprototype%.next
JS_DEFINE_NATIVE_FUNCTION(SetIteratorPrototype::next)
{
    auto this_value = vm.this_value(global_object);
    if (!this_value.is_object() || !is<SetIterator>(this_value.as_object())) {
        vm.throw_exception<TypeError>(global_object, ErrorType::NotA, "Set Iterator");
        return {};

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/SetPrototype.cpp
1 issues
syntax error
Error

Line: 60

              }

// 24.2.3.1 Set.prototype.add ( value ), https://tc39.es/ecma262/#sec-set.prototype.add
JS_DEFINE_NATIVE_FUNCTION(SetPrototype::add)
{
    auto* set = typed_this(vm, global_object);
    if (!set)
        return {};
    auto value = vm.argument(0);

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/StringConstructor.cpp
1 issues
syntax error
Error

Line: 77

              }

// 22.1.2.4 String.raw ( template, ...substitutions ), https://tc39.es/ecma262/#sec-string.raw
JS_DEFINE_NATIVE_FUNCTION(StringConstructor::raw)
{
    auto* cooked = vm.argument(0).to_object(global_object);
    if (vm.exception())
        return {};


            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/StringIteratorPrototype.cpp
1 issues
syntax error
Error

Line: 37

              }

// 22.1.5.1.1 %StringIteratorPrototype%.next ( ), https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
JS_DEFINE_NATIVE_FUNCTION(StringIteratorPrototype::next)
{
    auto this_value = vm.this_value(global_object);
    if (!this_value.is_object() || !is<StringIterator>(this_value.as_object())) {
        vm.throw_exception<TypeError>(global_object, ErrorType::NotA, "String Iterator");
        return {};

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/StringPrototype.cpp
1 issues
syntax error
Error

Line: 181

              }

// 22.1.3.1 String.prototype.charAt ( pos ), https://tc39.es/ecma262/#sec-string.prototype.charat
JS_DEFINE_NATIVE_FUNCTION(StringPrototype::char_at)
{
    auto string = utf16_string_from(vm, global_object);
    if (vm.exception())
        return {};
    auto position = vm.argument(0).to_integer_or_infinity(global_object);

            

Reported by Cppcheck.