[2/N] Fixes clang-tidy warnings in header files (#113727)

This PR fixes more clang-tidy warnings in common headers.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/113727
Approved by: https://github.com/Skylion007
This commit is contained in:
cyy
2023-11-16 13:21:15 +00:00
committed by PyTorch MergeBot
parent ecf129565b
commit f9bf104c64
11 changed files with 24 additions and 24 deletions

View File

@ -15,7 +15,7 @@ struct LoadImpl {
template <>
struct LoadImpl<bool> {
C10_HOST_DEVICE static bool apply(const void* src) {
static_assert(sizeof(bool) == sizeof(char), "");
static_assert(sizeof(bool) == sizeof(char));
// NOTE: [Loading boolean values]
// Protect against invalid boolean values by loading as a byte
// first, then converting to bool (see gh-54789).