Fix Wbitwise-instead-of-logical warnings

`a && b` only evaluates b if a is true. `a & b` always evaluates
both a and b. If a and b are of type bool, `&&` is usually what you
want, so clang now warns on `&` where both arguments are of type bool.
From what I can tell, in Dawn it wasn't important if we evaluate both
branches or not in the places where this fired, so I went with `&&`
everywhere.

Bug: chromium:1255745
Change-Id: Ifa196a7150d5bdfb8527fe8b6f40d7e2e957d609
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66200
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
This commit is contained in:
Nico Weber 2021-10-08 14:39:39 +00:00 committed by Dawn LUCI CQ
parent 5497aad240
commit 9a8099eb8b
1 changed files with 2 additions and 2 deletions

View File

@ -310,7 +310,7 @@ TEST_P(OcclusionQueryTests, ResolveSparseQueries) {
// TODO(hao.x.li@intel.com): Investigate why it's failed on D3D12 on Nvidia when running with
// the previous occlusion tests. Expect resolve to 0 for these unwritten queries but the
// occlusion result of the previous tests is got.
DAWN_SUPPRESS_TEST_IF(IsD3D12() & IsNvidia());
DAWN_SUPPRESS_TEST_IF(IsD3D12() && IsNvidia());
constexpr uint32_t kQueryCount = 7;
@ -370,7 +370,7 @@ TEST_P(OcclusionQueryTests, ResolveWithoutWritten) {
// TODO(hao.x.li@intel.com): Investigate why it's failed on D3D12 on Nvidia when running with
// the previous occlusion tests. Expect resolve to 0 but the occlusion result of the previous
// tests is got.
DAWN_SUPPRESS_TEST_IF(IsD3D12() & IsNvidia());
DAWN_SUPPRESS_TEST_IF(IsD3D12() && IsNvidia());
constexpr uint32_t kQueryCount = 1;