Fixup various warnings in Tint which were accidentally suppressed.

When enabling the SPIR-V reader or SPIR-V writer we were suppressing
-Wnewline-eof, -Wold-style-cast, -Wsign-conversion, and -Wweak-vtables
for the `libtint` cmake target and anything that depended on that
target. Because we'd build all readers/ writers by default this caused
us to never hit those warnings.

A recent change to the cmake build sets the Tint backend based on
the Dawn backend. So, there is a much higher chance of not building
the SPIR-V support if you're on a Mac or Windows machine.

This CL removes the suppression of the warnings, adds specific pragmas
into the SPIR-V reader code which imports the SPIRV-Tools headers
and fixes up the warnings which were then firing due to checking
for the new warnings.

Change-Id: I0d0be6aa3d0b692e939ce8ff924dfb82c82792fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94901
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
dan sinclair
2022-06-29 14:38:15 +00:00
committed by Dawn LUCI CQ
parent ad10eb59d1
commit 3a2a279714
88 changed files with 577 additions and 513 deletions

View File

@@ -91,4 +91,6 @@ VariableUser::VariableUser(const ast::IdentifierExpression* declaration,
}
}
VariableUser::~VariableUser() = default;
} // namespace tint::sem

View File

@@ -226,6 +226,7 @@ class VariableUser final : public Castable<VariableUser, Expression> {
VariableUser(const ast::IdentifierExpression* declaration,
Statement* statement,
sem::Variable* variable);
~VariableUser() override;
/// @returns the variable that this expression refers to
const sem::Variable* Variable() const { return variable_; }