mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 11:57:35 +00:00
Everywhere: Remove needless trailing semi-colons after functions
This is a new option in clang-format-16.
This commit is contained in:
parent
aff81d318b
commit
c911781c21
243 changed files with 483 additions and 481 deletions
|
@ -231,7 +231,7 @@ public:
|
|||
virtual void dump(int indent) const override;
|
||||
virtual Bytecode::CodeGenerationErrorOr<void> generate_bytecode(Bytecode::Generator&) const override;
|
||||
|
||||
Expression const& expression() const { return m_expression; };
|
||||
Expression const& expression() const { return m_expression; }
|
||||
|
||||
private:
|
||||
virtual bool is_expression_statement() const override { return true; }
|
||||
|
@ -709,7 +709,7 @@ public:
|
|||
StringView name() const { return m_name ? m_name->string().view() : ""sv; }
|
||||
DeprecatedString const& source_text() const { return m_source_text; }
|
||||
Statement const& body() const { return *m_body; }
|
||||
Vector<FunctionParameter> const& parameters() const { return m_parameters; };
|
||||
Vector<FunctionParameter> const& parameters() const { return m_parameters; }
|
||||
i32 function_length() const { return m_function_length; }
|
||||
Vector<DeprecatedFlyString> const& local_variables_names() const { return m_local_variables_names; }
|
||||
bool is_strict_mode() const { return m_is_strict_mode; }
|
||||
|
@ -1345,7 +1345,7 @@ public:
|
|||
using ClassValue = Variant<ClassFieldDefinition, Completion, PrivateElement>;
|
||||
virtual ThrowCompletionOr<ClassValue> class_element_evaluation(VM&, Object& home_object) const = 0;
|
||||
|
||||
virtual Optional<DeprecatedFlyString> private_bound_identifier() const { return {}; };
|
||||
virtual Optional<DeprecatedFlyString> private_bound_identifier() const { return {}; }
|
||||
|
||||
private:
|
||||
bool m_is_static { false };
|
||||
|
@ -1804,7 +1804,7 @@ public:
|
|||
|
||||
ThrowCompletionOr<void> for_each_bound_identifier(ThrowCompletionOrVoidCallback<Identifier const&>&&) const override;
|
||||
|
||||
virtual bool is_constant_declaration() const override { return m_declaration_kind == DeclarationKind::Const; };
|
||||
virtual bool is_constant_declaration() const override { return m_declaration_kind == DeclarationKind::Const; }
|
||||
|
||||
virtual bool is_lexical_declaration() const override { return m_declaration_kind != DeclarationKind::Var; }
|
||||
|
||||
|
@ -1830,7 +1830,7 @@ public:
|
|||
|
||||
ThrowCompletionOr<void> for_each_bound_identifier(ThrowCompletionOrVoidCallback<Identifier const&>&&) const override;
|
||||
|
||||
virtual bool is_constant_declaration() const override { return true; };
|
||||
virtual bool is_constant_declaration() const override { return true; }
|
||||
|
||||
virtual bool is_lexical_declaration() const override { return true; }
|
||||
|
||||
|
|
|
@ -625,7 +625,7 @@ ThrowCompletionOr<void> DeleteById::execute_impl(Bytecode::Interpreter& interpre
|
|||
auto reference = Reference { base_value, identifier, {}, strict };
|
||||
interpreter.accumulator() = Value(TRY(reference.delete_(vm)));
|
||||
return {};
|
||||
};
|
||||
}
|
||||
|
||||
ThrowCompletionOr<void> DeleteByIdWithThis::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
|
@ -636,7 +636,7 @@ ThrowCompletionOr<void> DeleteByIdWithThis::execute_impl(Bytecode::Interpreter&
|
|||
auto reference = Reference { base_value, identifier, interpreter.reg(m_this_value), strict };
|
||||
interpreter.accumulator() = Value(TRY(reference.delete_(vm)));
|
||||
return {};
|
||||
};
|
||||
}
|
||||
|
||||
ThrowCompletionOr<void> Jump::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
|
@ -1139,7 +1139,7 @@ ThrowCompletionOr<void> DeleteByValueWithThis::execute_impl(Bytecode::Interprete
|
|||
auto reference = Reference { base_value, property_key, interpreter.reg(m_this_value), strict };
|
||||
interpreter.accumulator() = Value(TRY(reference.delete_(vm)));
|
||||
return {};
|
||||
};
|
||||
}
|
||||
|
||||
ThrowCompletionOr<void> GetIterator::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
roots.set(value);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ public:
|
|||
|
||||
Token next();
|
||||
|
||||
DeprecatedString const& source() const { return m_source; };
|
||||
String const& filename() const { return m_filename; };
|
||||
DeprecatedString const& source() const { return m_source; }
|
||||
String const& filename() const { return m_filename; }
|
||||
|
||||
void disallow_html_comments() { m_allow_html_comments = false; };
|
||||
void disallow_html_comments() { m_allow_html_comments = false; }
|
||||
|
||||
Token force_slash_as_regex();
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
virtual ThrowCompletionOr<bool> internal_delete(PropertyKey const&) override;
|
||||
virtual ThrowCompletionOr<MarkedVector<Value>> internal_own_property_keys() const override;
|
||||
|
||||
[[nodiscard]] bool length_is_writable() const { return m_length_writable; };
|
||||
[[nodiscard]] bool length_is_writable() const { return m_length_writable; }
|
||||
|
||||
protected:
|
||||
explicit Array(Object& prototype);
|
||||
|
|
|
@ -45,19 +45,19 @@ public:
|
|||
void make_method(Object& home_object);
|
||||
|
||||
Statement const& ecmascript_code() const { return m_ecmascript_code; }
|
||||
Vector<FunctionParameter> const& formal_parameters() const { return m_formal_parameters; };
|
||||
Vector<FunctionParameter> const& formal_parameters() const { return m_formal_parameters; }
|
||||
|
||||
virtual DeprecatedFlyString const& name() const override { return m_name; };
|
||||
virtual DeprecatedFlyString const& name() const override { return m_name; }
|
||||
void set_name(DeprecatedFlyString const& name);
|
||||
|
||||
void set_is_class_constructor() { m_is_class_constructor = true; };
|
||||
void set_is_class_constructor() { m_is_class_constructor = true; }
|
||||
|
||||
auto& bytecode_executable() const { return m_bytecode_executable; }
|
||||
|
||||
Environment* environment() { return m_environment; }
|
||||
virtual Realm* realm() const override { return m_realm; }
|
||||
|
||||
ConstructorKind constructor_kind() const { return m_constructor_kind; };
|
||||
ConstructorKind constructor_kind() const { return m_constructor_kind; }
|
||||
void set_constructor_kind(ConstructorKind constructor_kind) { m_constructor_kind = constructor_kind; }
|
||||
|
||||
ThisMode this_mode() const { return m_this_mode; }
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
void add_field(ClassFieldDefinition field) { m_fields.append(move(field)); }
|
||||
|
||||
Vector<PrivateElement> const& private_methods() const { return m_private_methods; }
|
||||
void add_private_method(PrivateElement method) { m_private_methods.append(move(method)); };
|
||||
void add_private_method(PrivateElement method) { m_private_methods.append(move(method)); }
|
||||
|
||||
// This is for IsSimpleParameterList (static semantics)
|
||||
bool has_simple_parameter_list() const { return m_has_simple_parameter_list; }
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
// [[Realm]]
|
||||
virtual Realm* realm() const { return nullptr; }
|
||||
|
||||
virtual Vector<DeprecatedFlyString> const& local_variables_names() const { VERIFY_NOT_REACHED(); };
|
||||
virtual Vector<DeprecatedFlyString> const& local_variables_names() const { VERIFY_NOT_REACHED(); }
|
||||
|
||||
protected:
|
||||
explicit FunctionObject(Realm&, Object* prototype);
|
||||
|
|
|
@ -101,7 +101,7 @@ public:
|
|||
IndexedPropertyIterator& operator*();
|
||||
bool operator!=(IndexedPropertyIterator const&) const;
|
||||
|
||||
u32 index() const { return m_index; };
|
||||
u32 index() const { return m_index; }
|
||||
|
||||
private:
|
||||
void skip_empty_indices();
|
||||
|
@ -129,8 +129,8 @@ public:
|
|||
|
||||
void append(Value value, PropertyAttributes attributes = default_attributes) { put(array_like_size(), value, attributes); }
|
||||
|
||||
IndexedPropertyIterator begin(bool skip_empty = true) const { return IndexedPropertyIterator(*this, 0, skip_empty); };
|
||||
IndexedPropertyIterator end() const { return IndexedPropertyIterator(*this, array_like_size(), false); };
|
||||
IndexedPropertyIterator begin(bool skip_empty = true) const { return IndexedPropertyIterator(*this, 0, skip_empty); }
|
||||
IndexedPropertyIterator end() const { return IndexedPropertyIterator(*this, array_like_size(), false); }
|
||||
|
||||
bool is_empty() const { return array_like_size() == 0; }
|
||||
size_t array_like_size() const { return m_storage ? m_storage->array_like_size() : 0; }
|
||||
|
|
|
@ -65,62 +65,62 @@ public:
|
|||
void set_time_zone(String time_zone) { m_time_zone = move(time_zone); }
|
||||
|
||||
bool has_date_style() const { return m_date_style.has_value(); }
|
||||
Style date_style() const { return *m_date_style; };
|
||||
StringView date_style_string() const { return style_to_string(*m_date_style); };
|
||||
void set_date_style(StringView style) { m_date_style = style_from_string(style); };
|
||||
Style date_style() const { return *m_date_style; }
|
||||
StringView date_style_string() const { return style_to_string(*m_date_style); }
|
||||
void set_date_style(StringView style) { m_date_style = style_from_string(style); }
|
||||
|
||||
bool has_time_style() const { return m_time_style.has_value(); }
|
||||
Style time_style() const { return *m_time_style; };
|
||||
StringView time_style_string() const { return style_to_string(*m_time_style); };
|
||||
void set_time_style(StringView style) { m_time_style = style_from_string(style); };
|
||||
Style time_style() const { return *m_time_style; }
|
||||
StringView time_style_string() const { return style_to_string(*m_time_style); }
|
||||
void set_time_style(StringView style) { m_time_style = style_from_string(style); }
|
||||
|
||||
String const& pattern() const { return Patterns::pattern; };
|
||||
String const& pattern() const { return Patterns::pattern; }
|
||||
void set_pattern(String pattern) { Patterns::pattern = move(pattern); }
|
||||
|
||||
ReadonlySpan<::Locale::CalendarRangePattern> range_patterns() const { return m_range_patterns.span(); };
|
||||
ReadonlySpan<::Locale::CalendarRangePattern> range_patterns() const { return m_range_patterns.span(); }
|
||||
void set_range_patterns(Vector<::Locale::CalendarRangePattern> range_patterns) { m_range_patterns = move(range_patterns); }
|
||||
|
||||
bool has_era() const { return Patterns::era.has_value(); }
|
||||
::Locale::CalendarPatternStyle era() const { return *Patterns::era; };
|
||||
::Locale::CalendarPatternStyle era() const { return *Patterns::era; }
|
||||
StringView era_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::era); }
|
||||
|
||||
bool has_year() const { return Patterns::year.has_value(); }
|
||||
::Locale::CalendarPatternStyle year() const { return *Patterns::year; };
|
||||
::Locale::CalendarPatternStyle year() const { return *Patterns::year; }
|
||||
StringView year_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::year); }
|
||||
|
||||
bool has_month() const { return Patterns::month.has_value(); }
|
||||
::Locale::CalendarPatternStyle month() const { return *Patterns::month; };
|
||||
::Locale::CalendarPatternStyle month() const { return *Patterns::month; }
|
||||
StringView month_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::month); }
|
||||
|
||||
bool has_weekday() const { return Patterns::weekday.has_value(); }
|
||||
::Locale::CalendarPatternStyle weekday() const { return *Patterns::weekday; };
|
||||
::Locale::CalendarPatternStyle weekday() const { return *Patterns::weekday; }
|
||||
StringView weekday_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::weekday); }
|
||||
|
||||
bool has_day() const { return Patterns::day.has_value(); }
|
||||
::Locale::CalendarPatternStyle day() const { return *Patterns::day; };
|
||||
::Locale::CalendarPatternStyle day() const { return *Patterns::day; }
|
||||
StringView day_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::day); }
|
||||
|
||||
bool has_day_period() const { return Patterns::day_period.has_value(); }
|
||||
::Locale::CalendarPatternStyle day_period() const { return *Patterns::day_period; };
|
||||
::Locale::CalendarPatternStyle day_period() const { return *Patterns::day_period; }
|
||||
StringView day_period_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::day_period); }
|
||||
|
||||
bool has_hour() const { return Patterns::hour.has_value(); }
|
||||
::Locale::CalendarPatternStyle hour() const { return *Patterns::hour; };
|
||||
::Locale::CalendarPatternStyle hour() const { return *Patterns::hour; }
|
||||
StringView hour_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::hour); }
|
||||
|
||||
bool has_minute() const { return Patterns::minute.has_value(); }
|
||||
::Locale::CalendarPatternStyle minute() const { return *Patterns::minute; };
|
||||
::Locale::CalendarPatternStyle minute() const { return *Patterns::minute; }
|
||||
StringView minute_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::minute); }
|
||||
|
||||
bool has_second() const { return Patterns::second.has_value(); }
|
||||
::Locale::CalendarPatternStyle second() const { return *Patterns::second; };
|
||||
::Locale::CalendarPatternStyle second() const { return *Patterns::second; }
|
||||
StringView second_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::second); }
|
||||
|
||||
bool has_fractional_second_digits() const { return Patterns::fractional_second_digits.has_value(); }
|
||||
u8 fractional_second_digits() const { return *Patterns::fractional_second_digits; };
|
||||
u8 fractional_second_digits() const { return *Patterns::fractional_second_digits; }
|
||||
|
||||
bool has_time_zone_name() const { return Patterns::time_zone_name.has_value(); }
|
||||
::Locale::CalendarPatternStyle time_zone_name() const { return *Patterns::time_zone_name; };
|
||||
::Locale::CalendarPatternStyle time_zone_name() const { return *Patterns::time_zone_name; }
|
||||
StringView time_zone_name_string() const { return ::Locale::calendar_pattern_style_to_string(*Patterns::time_zone_name); }
|
||||
|
||||
NativeFunction* bound_format() const { return m_bound_format; }
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
virtual ThrowCompletionOr<Value> call();
|
||||
virtual ThrowCompletionOr<NonnullGCPtr<Object>> construct(FunctionObject& new_target);
|
||||
|
||||
virtual DeprecatedFlyString const& name() const override { return m_name; };
|
||||
virtual DeprecatedFlyString const& name() const override { return m_name; }
|
||||
virtual bool is_strict_mode() const override;
|
||||
virtual bool has_constructor() const override { return false; }
|
||||
virtual Realm* realm() const override { return m_realm; }
|
||||
|
|
|
@ -148,7 +148,7 @@ public:
|
|||
|
||||
Value get_without_side_effects(PropertyKey const&) const;
|
||||
|
||||
void define_direct_property(PropertyKey const& property_key, Value value, PropertyAttributes attributes) { storage_set(property_key, { value, attributes }); };
|
||||
void define_direct_property(PropertyKey const& property_key, Value value, PropertyAttributes attributes) { storage_set(property_key, { value, attributes }); }
|
||||
void define_direct_accessor(PropertyKey const&, FunctionObject* getter, FunctionObject* setter, PropertyAttributes attributes);
|
||||
|
||||
using IntrinsicAccessor = Value (*)(Realm&);
|
||||
|
|
|
@ -25,8 +25,8 @@ public:
|
|||
[[nodiscard]] String const& identifier() const { return m_identifier; }
|
||||
[[nodiscard]] Optional<OffsetType> const& offset_nanoseconds() const { return m_offset_nanoseconds; }
|
||||
|
||||
void set_identifier(String identifier) { m_identifier = move(identifier); };
|
||||
void set_offset_nanoseconds(OffsetType offset_nanoseconds) { m_offset_nanoseconds = offset_nanoseconds; };
|
||||
void set_identifier(String identifier) { m_identifier = move(identifier); }
|
||||
void set_offset_nanoseconds(OffsetType offset_nanoseconds) { m_offset_nanoseconds = offset_nanoseconds; }
|
||||
|
||||
private:
|
||||
explicit TimeZone(Object& prototype);
|
||||
|
|
|
@ -423,7 +423,7 @@ public:
|
|||
return { reinterpret_cast<UnderlyingBufferDataType*>(m_viewed_array_buffer->buffer().data() + m_byte_offset), m_array_length };
|
||||
}
|
||||
|
||||
virtual size_t element_size() const override { return sizeof(UnderlyingBufferDataType); };
|
||||
virtual size_t element_size() const override { return sizeof(UnderlyingBufferDataType); }
|
||||
|
||||
bool is_unclamped_integer_element_type() const override
|
||||
{
|
||||
|
|
|
@ -187,7 +187,7 @@ public:
|
|||
|
||||
ThrowCompletionOr<Value> resolve_this_binding();
|
||||
|
||||
StackInfo const& stack_info() const { return m_stack_info; };
|
||||
StackInfo const& stack_info() const { return m_stack_info; }
|
||||
|
||||
HashMap<String, NonnullGCPtr<Symbol>> const& global_symbol_registry() const { return m_global_symbol_registry; }
|
||||
HashMap<String, NonnullGCPtr<Symbol>>& global_symbol_registry() { return m_global_symbol_registry; }
|
||||
|
|
|
@ -138,8 +138,8 @@ public:
|
|||
bool is_object() const { return m_value.tag == OBJECT_TAG; }
|
||||
bool is_boolean() const { return m_value.tag == BOOLEAN_TAG; }
|
||||
bool is_symbol() const { return m_value.tag == SYMBOL_TAG; }
|
||||
bool is_accessor() const { return m_value.tag == ACCESSOR_TAG; };
|
||||
bool is_bigint() const { return m_value.tag == BIGINT_TAG; };
|
||||
bool is_accessor() const { return m_value.tag == ACCESSOR_TAG; }
|
||||
bool is_bigint() const { return m_value.tag == BIGINT_TAG; }
|
||||
bool is_nullish() const { return (m_value.tag & IS_NULLISH_EXTRACT_PATTERN) == IS_NULLISH_PATTERN; }
|
||||
bool is_cell() const { return (m_value.tag & IS_CELL_PATTERN) == IS_CELL_PATTERN; }
|
||||
ThrowCompletionOr<bool> is_array(VM&) const;
|
||||
|
|
|
@ -23,8 +23,8 @@ public:
|
|||
|
||||
virtual ~WeakMap() override = default;
|
||||
|
||||
HashMap<GCPtr<Cell>, Value> const& values() const { return m_values; };
|
||||
HashMap<GCPtr<Cell>, Value>& values() { return m_values; };
|
||||
HashMap<GCPtr<Cell>, Value> const& values() const { return m_values; }
|
||||
HashMap<GCPtr<Cell>, Value>& values() { return m_values; }
|
||||
|
||||
virtual void remove_dead_cells(Badge<Heap>) override;
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ public:
|
|||
|
||||
virtual ~WeakRef() override = default;
|
||||
|
||||
auto const& value() const { return m_value; };
|
||||
auto const& value() const { return m_value; }
|
||||
|
||||
void update_execution_generation() { m_last_execution_generation = vm().execution_generation(); };
|
||||
void update_execution_generation() { m_last_execution_generation = vm().execution_generation(); }
|
||||
|
||||
virtual void remove_dead_cells(Badge<Heap>) override;
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ public:
|
|||
|
||||
virtual ~WeakSet() override = default;
|
||||
|
||||
HashTable<GCPtr<Cell>> const& values() const { return m_values; };
|
||||
HashTable<GCPtr<Cell>>& values() { return m_values; };
|
||||
HashTable<GCPtr<Cell>> const& values() const { return m_values; }
|
||||
HashTable<GCPtr<Cell>>& values() { return m_values; }
|
||||
|
||||
virtual void remove_dead_cells(Badge<Heap>) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue