Skip to content

Commit

Permalink
refactor(container): silence GCC 'final' warning
Browse files Browse the repository at this point in the history
GCC now reports the following warning:

> linked-bump-allocator.h:39:7: error: Declaring type 'class
  quick_lint_js::Linked_Bump_Allocator<8>' final would enable
  devirtualization of 1 call [-Werror=suggest-final-types]

Heed GCC's warning by marking the class final.
  • Loading branch information
strager committed Oct 29, 2023
1 parent 46a20e4 commit d0b8ceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/quick-lint-js/container/linked-bump-allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace quick_lint_js {
//
// Internally, Linked_Bump_Allocator maintains a linked list of chunks.
template <std::size_t alignment>
class Linked_Bump_Allocator : public Memory_Resource {
class Linked_Bump_Allocator final : public Memory_Resource {
private:
struct Chunk_Header;
using Chunk = Flexible_Array<char, Chunk_Header>;
Expand Down

0 comments on commit d0b8ceb

Please sign in to comment.