Skip to content

Commit 676017e

Browse files
authored
[NFC] Add NOLINTNEXTLINE for static_cast (#1876)
Despite multiple inheritance static_cast from 'SPIRVEntry *' to 'SPIRV::SPIRVFunction *' should be safe. Replacing static_cast with dynamic_cast would be even safer, but it would add extra runtime overhead. So add ignore this clang-tidy check. Signed-off-by: Sidorov, Dmitry <[email protected]>
1 parent 3da4d02 commit 676017e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SPIRV/libSPIRV/SPIRVEntry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ class SPIRVEntry {
270270

271271
bool exist(SPIRVId) const;
272272
template <class T> T *get(SPIRVId TheId) const {
273+
// NOLINTNEXTLINE
273274
return static_cast<T *>(getEntry(TheId));
274275
}
275276
SPIRVEntry *getEntry(SPIRVId) const;

0 commit comments

Comments
 (0)