clang-tidy

This commit is contained in:
Markus F.X.J. Oberhumer
2023-07-31 14:49:48 +02:00
parent 41e9f7985f
commit 70287d3c49
20 changed files with 176 additions and 51 deletions
+4
View File
@@ -615,6 +615,8 @@ TEST_CASE("Span subspan") {
TEST_CASE("Span constness") {
static char buf[4] = {0, 1, 2, 3};
// NOLINTBEGIN(performance-unnecessary-copy-initialization)
XSPAN_0(char) b0(buf, 4);
XSPAN_P(char) bp(buf, 4);
XSPAN_S(char) bs(buf, 4);
@@ -635,6 +637,8 @@ TEST_CASE("Span constness") {
XSPAN_P(const char) xpc(bp);
XSPAN_S(const char) xsc(bs);
// NOLINTEND(performance-unnecessary-copy-initialization)
CHECK(ptr_diff_bytes(b0, buf) == 0);
CHECK(ptr_diff_bytes(bp, buf) == 0);
CHECK(ptr_diff_bytes(bs, buf) == 0);