mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Use 'final' specifier on leaf classes
Tint makes heavy use of RTTI via virtual methods. Give the compiler the opportunity to optimize away some of these virtuals. Bug: tint:1383 Change-Id: I28edfaa0a05bb1a9c506c61c0084542c0aeb37f0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82745 Reviewed-by: James Price <jrprice@google.com> Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
dc0e31cfaa
commit
41f8d2ad52
@@ -47,13 +47,13 @@ namespace {
|
||||
|
||||
using ResolverValidationTest = ResolverTest;
|
||||
|
||||
class FakeStmt : public Castable<FakeStmt, ast::Statement> {
|
||||
class FakeStmt final : public Castable<FakeStmt, ast::Statement> {
|
||||
public:
|
||||
FakeStmt(ProgramID pid, Source src) : Base(pid, src) {}
|
||||
FakeStmt* Clone(CloneContext*) const override { return nullptr; }
|
||||
};
|
||||
|
||||
class FakeExpr : public Castable<FakeExpr, ast::Expression> {
|
||||
class FakeExpr final : public Castable<FakeExpr, ast::Expression> {
|
||||
public:
|
||||
FakeExpr(ProgramID pid, Source src) : Base(pid, src) {}
|
||||
FakeExpr* Clone(CloneContext*) const override { return nullptr; }
|
||||
|
||||
Reference in New Issue
Block a user