Skip to content

Commit cd096e9

Browse files
committed
clang-tidy
1 parent 4298f86 commit cd096e9

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

compiler/extensions/cpp/runtime/ClangTidySuppressions.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ cppcoreguidelines-pro-bounds-pointer-arithmetic:src/zserio/BitBuffer.h:274
7373
# This is false positive, the member is initialized.
7474
cppcoreguidelines-pro-type-member-init:src/zserio/BitStreamWriter.h:70
7575
# This is aligned storage which we want to leave uninitialized.
76-
cppcoreguidelines-pro-type-member-init:src/zserio/OptionalHolder.h:693
76+
cppcoreguidelines-pro-type-member-init:src/zserio/OptionalHolder.h:694
7777

7878
# This is necessary for implementation of low level implementation of AnyHolder and OptionalHolder to mimic
7979
# standard C++17 'any' and 'optional' abstractions.
8080
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/AnyHolder.h:832
8181
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/AnyHolder.h:838
8282
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/AnyHolder.h:868
8383
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/AnyHolder.h:875
84-
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/OptionalHolder.h:657
85-
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/OptionalHolder.h:667
84+
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/OptionalHolder.h:658
85+
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/OptionalHolder.h:668
8686
# This is necessary for implementation of reading and writing to the file.
8787
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/FileUtil.cpp:19
8888
cppcoreguidelines-pro-type-reinterpret-cast:src/zserio/FileUtil.cpp:49
@@ -100,9 +100,9 @@ google-explicit-constructor:src/zserio/BitStreamReader.h:43
100100
google-explicit-constructor:src/zserio/OptionalHolder.h:231
101101
google-explicit-constructor:src/zserio/OptionalHolder.h:241
102102
google-explicit-constructor:src/zserio/OptionalHolder.h:251
103-
google-explicit-constructor:src/zserio/OptionalHolder.h:698
104-
google-explicit-constructor:src/zserio/OptionalHolder.h:706
105-
google-explicit-constructor:src/zserio/OptionalHolder.h:717
103+
google-explicit-constructor:src/zserio/OptionalHolder.h:699
104+
google-explicit-constructor:src/zserio/OptionalHolder.h:707
105+
google-explicit-constructor:src/zserio/OptionalHolder.h:718
106106
google-explicit-constructor:src/zserio/pmr/PolymorphicAllocator.h:46
107107
google-explicit-constructor:src/zserio/pmr/PolymorphicAllocator.h:71
108108
google-explicit-constructor:src/zserio/Span.h:114
@@ -164,6 +164,10 @@ cppcoreguidelines-pro-bounds-pointer-arithmetic:test/zserio/StringViewTest.cpp:2
164164
# Intentional tests.
165165
cppcoreguidelines-pro-type-reinterpret-cast:test/zserio/SqliteConnectionTest.cpp:320
166166

167+
# Just a test for move ctor should not define all other ctors
168+
cppcoreguidelines-special-member-functions:test/zserio/InplaceOptionalHolderTest.cpp:403
169+
cppcoreguidelines-special-member-functions:test/zserio/InplaceOptionalHolderTest.cpp:410
170+
167171
# Intentional tests. It is necessary for readability.
168172
google-build-using-namespace:test/zserio/ReflectableTest.cpp:22
169173

compiler/extensions/cpp/runtime/test/zserio/InplaceOptionalHolderTest.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,16 +402,14 @@ TEST_F(InplaceOptionalHolderTest, constGet)
402402

403403
struct NothrowMoveCtor
404404
{
405-
NothrowMoveCtor()
406-
{}
405+
NothrowMoveCtor() = default;
407406
NothrowMoveCtor(NothrowMoveCtor&&) noexcept
408407
{}
409408
};
410409

411410
struct ThrowMoveCtor
412411
{
413-
ThrowMoveCtor()
414-
{}
412+
ThrowMoveCtor() = default;
415413
ThrowMoveCtor(ThrowMoveCtor&&)
416414
{}
417415
};

0 commit comments

Comments
 (0)