Skip to content

Commit

Permalink
Mark ManifestParser class as final.
Browse files Browse the repository at this point in the history
This fixed clang `[-Wdelete-non-abstract-non-virtual-dtor]` warning:
    delete called on non-final 'ManifestParser' that has virtual
    functions but non-virtual destructor.
for `subparser_.reset(new ManifestParser(state_, file_reader_, options_));`.
  • Loading branch information
zufuliu committed Dec 5, 2024
1 parent d344479 commit 5be431f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manifest_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct ManifestParserOptions {
};

/// Parses .ninja files.
struct ManifestParser : public Parser {
struct ManifestParser final : public Parser {
ManifestParser(State* state, FileReader* file_reader,
ManifestParserOptions options = ManifestParserOptions());

Expand Down

0 comments on commit 5be431f

Please sign in to comment.