diff options
| author | 2019-01-09 15:49:59 -0800 | |
|---|---|---|
| committer | 2019-01-09 16:11:49 -0800 | |
| commit | f326c9b55e4f2a1674f49101befcd325a2d15d4b (patch) | |
| tree | f71ac38969d2d8441727f0a73ac7752a613d01f5 /vulkan/libvulkan/api.cpp | |
| parent | 47a389f2acd819d0a9fdb2b8bb0b0254b8e28abc (diff) | |
NFC: Switch CHECK_INTERFACE to be a more friendly macro statement.
In the process of upgrading to clang r349610, an improvement to the
-Wextra-semi diagnostic now catches redundant semicolons in code.
CHECK_INTERFACE is a macro statement (currently using an if with a code
block that ends in a '}'). Since most callers are treating this as a
pseudo-function call, they terminate the macro with a semicolon. This
triggers the diagnostic, as we now have "if (...) { ... };", where the
semicolon is unnecessary.
To remedy these kinds of situations, it is better to construct macro
statements that require a semicolon to terminate them. This patch uses a
do/while wrapped around the existing statement, which is a pretty common
pattern for macro statements.
Bug: http://b/122481018
Test: m checkbuild
Change-Id: Ic2efc662f70f6b311e5d4581fb8e0eeb12a361f9
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions