Skip to content

Commit d5ad9b4

Browse files
Silence clang-tidy checks for method names in overridden interface
Change-Id: I4decc88d10ea13f68896d9cfaea6f9f4de0feab2 Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent b674b4a commit d5ad9b4

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

opencl/test/unit_test/mocks/mock_cif.h

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ using CreatorFuncT = CIF::ICIF *(*)(CIF::InterfaceId_t intId, CIF::Version_t ver
2222

2323
template <typename BaseType = CIF::ICIF>
2424
struct MockCIF : BaseType {
25-
void Release() override {
25+
void Release() override { // NOLINT(readability-identifier-naming)
2626
auto prev = refCount--;
2727
assert(prev >= 1);
2828
if (prev == 1) {
2929
delete this;
3030
}
3131
}
3232

33-
void Retain() override {
33+
void Retain() override { // NOLINT(readability-identifier-naming)
3434
++refCount;
3535
}
3636

37-
uint32_t GetRefCount() const override {
37+
uint32_t GetRefCount() const override { // NOLINT(readability-identifier-naming)
3838
return refCount;
3939
}
4040

41-
CIF::Version_t GetEnabledVersion() const override {
41+
CIF::Version_t GetEnabledVersion() const override { // NOLINT(readability-identifier-naming)
4242
return 1;
4343
}
4444

45-
bool GetSupportedVersions(CIF::InterfaceId_t intId, CIF::Version_t &verMin,
45+
bool GetSupportedVersions(CIF::InterfaceId_t intId, CIF::Version_t &verMin, // NOLINT(readability-identifier-naming)
4646
CIF::Version_t &verMax) const override {
4747
verMin = 1;
4848
verMax = CIF::MaxVersion;
@@ -91,13 +91,13 @@ struct MockCIFMain : MockCIF<CIF::CIFMain> {
9191

9292
MockCIFMain();
9393

94-
CIF::Version_t GetBinaryVersion() const override {
94+
CIF::Version_t GetBinaryVersion() const override { // NOLINT(readability-identifier-naming)
9595
return 1;
9696
}
9797

98-
CIF::ICIF *CreateInterfaceImpl(CIF::InterfaceId_t intId, CIF::Version_t version) override;
98+
CIF::ICIF *CreateInterfaceImpl(CIF::InterfaceId_t intId, CIF::Version_t version) override; // NOLINT(readability-identifier-naming)
9999

100-
CIF::InterfaceId_t FindIncompatibleImpl(CIF::InterfaceId_t entryPointInterface, CIF::CompatibilityDataHandle handle) const override {
100+
CIF::InterfaceId_t FindIncompatibleImpl(CIF::InterfaceId_t entryPointInterface, CIF::CompatibilityDataHandle handle) const override { // NOLINT(readability-identifier-naming)
101101
if (globalCreators.find(entryPointInterface) != globalCreators.end()) {
102102
return CIF::InvalidInterface;
103103
}
@@ -107,7 +107,7 @@ struct MockCIFMain : MockCIF<CIF::CIFMain> {
107107
return entryPointInterface;
108108
}
109109

110-
bool FindSupportedVersionsImpl(CIF::InterfaceId_t entryPointInterface, CIF::InterfaceId_t interfaceToFind, CIF::Version_t &verMin, CIF::Version_t &verMax) const override {
110+
bool FindSupportedVersionsImpl(CIF::InterfaceId_t entryPointInterface, CIF::InterfaceId_t interfaceToFind, CIF::Version_t &verMin, CIF::Version_t &verMax) const override { // NOLINT(readability-identifier-naming)
111111
if (globalCreators.find(entryPointInterface) != globalCreators.end()) {
112112
verMin = verMax = 1;
113113
return true;
@@ -125,95 +125,95 @@ struct MockCIFMain : MockCIF<CIF::CIFMain> {
125125

126126
struct MockCIFBuffer : MockCIF<CIF::Builtins::BufferSimple> {
127127
MockCIFBuffer();
128-
static CIF::ICIF *Create(CIF::InterfaceId_t intId, CIF::Version_t version);
128+
static CIF::ICIF *Create(CIF::InterfaceId_t intId, CIF::Version_t version); // NOLINT(readability-identifier-naming)
129129
static bool failAllocations;
130130

131-
void SetAllocator(CIF::Builtins::AllocatorT allocator, CIF::Builtins::DeallocatorT deallocator,
131+
void SetAllocator(CIF::Builtins::AllocatorT allocator, CIF::Builtins::DeallocatorT deallocator, // NOLINT(readability-identifier-naming)
132132
CIF::Builtins::ReallocatorT reallocator) override {
133133
// unsupported in mock
134134
}
135135

136-
void SetUnderlyingStorage(void *memory, size_t size, CIF::Builtins::DeallocatorT deallocator) override {
136+
void SetUnderlyingStorage(void *memory, size_t size, CIF::Builtins::DeallocatorT deallocator) override { // NOLINT(readability-identifier-naming)
137137
if ((memory == nullptr) || (size == 0)) {
138138
data.clear();
139139
return;
140140
}
141141
data.assign((char *)memory, ((char *)memory) + size);
142142
}
143143

144-
void SetUnderlyingStorage(const void *memory, size_t size) override {
144+
void SetUnderlyingStorage(const void *memory, size_t size) override { // NOLINT(readability-identifier-naming)
145145
if ((memory == nullptr) || (size == 0)) {
146146
data.clear();
147147
return;
148148
}
149149
data.assign((char *)memory, ((char *)memory) + size);
150150
}
151151

152-
void *DetachAllocation() override {
152+
void *DetachAllocation() override { // NOLINT(readability-identifier-naming)
153153
// unsupported in mock
154154
return nullptr;
155155
}
156156

157-
const void *GetMemoryRaw() const override {
157+
const void *GetMemoryRaw() const override { // NOLINT(readability-identifier-naming)
158158
if (data.size() > 0) {
159159
return data.data();
160160
} else {
161161
return nullptr;
162162
}
163163
}
164164

165-
void *GetMemoryRawWriteable() override {
165+
void *GetMemoryRawWriteable() override { // NOLINT(readability-identifier-naming)
166166
if (data.size() > 0) {
167167
return data.data();
168168
} else {
169169
return nullptr;
170170
}
171171
}
172172

173-
size_t GetSizeRaw() const override {
173+
size_t GetSizeRaw() const override { // NOLINT(readability-identifier-naming)
174174
return data.size();
175175
}
176176

177-
size_t GetCapacityRaw() const override {
177+
size_t GetCapacityRaw() const override { // NOLINT(readability-identifier-naming)
178178
return data.capacity();
179179
}
180180

181-
bool Resize(size_t newSize) override {
181+
bool Resize(size_t newSize) override { // NOLINT(readability-identifier-naming)
182182
data.resize(newSize);
183183
return true;
184184
}
185185

186-
bool Reserve(size_t newCapacity) override {
186+
bool Reserve(size_t newCapacity) override { // NOLINT(readability-identifier-naming)
187187
data.reserve(newCapacity);
188188
return true;
189189
}
190190

191-
void Clear() override {
191+
void Clear() override { // NOLINT(readability-identifier-naming)
192192
data.clear();
193193
}
194194

195-
void Deallocate() override {
195+
void Deallocate() override { // NOLINT(readability-identifier-naming)
196196
std::vector<char> rhs;
197197
rhs.swap(data);
198198
}
199199

200-
bool AlignUp(uint32_t alignment) override {
200+
bool AlignUp(uint32_t alignment) override { // NOLINT(readability-identifier-naming)
201201
auto rest = data.size() & alignment;
202202
if (rest != 0) {
203203
data.resize(data.size() + alignment - rest);
204204
}
205205
return true;
206206
}
207207

208-
bool PushBackRawBytes(const void *newData, size_t size) override {
208+
bool PushBackRawBytes(const void *newData, size_t size) override { // NOLINT(readability-identifier-naming)
209209
if ((newData == nullptr) || (size == 0)) {
210210
return true;
211211
}
212212
data.insert(data.end(), (char *)newData, ((char *)newData) + size);
213213
return true;
214214
}
215215

216-
bool IsConst() const override {
216+
bool IsConst() const override { // NOLINT(readability-identifier-naming)
217217
return false;
218218
}
219219

0 commit comments

Comments
 (0)