Changeset View
Changeset View
Standalone View
Standalone View
compiler-rt/lib/fuzzer/FuzzerUtil.h
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
inline uint8_t *RoundDownByPage(uint8_t *P) { | inline uint8_t *RoundDownByPage(uint8_t *P) { | ||||
uintptr_t X = reinterpret_cast<uintptr_t>(P); | uintptr_t X = reinterpret_cast<uintptr_t>(P); | ||||
size_t Mask = PageSize() - 1; | size_t Mask = PageSize() - 1; | ||||
X = X & ~Mask; | X = X & ~Mask; | ||||
return reinterpret_cast<uint8_t *>(X); | return reinterpret_cast<uint8_t *>(X); | ||||
} | } | ||||
#if __BYTE_ORDER == __LITTLE_ENDIAN | |||||
template <typename T> T HostToLE(T X) { return X; } | |||||
Lint: Pre-merge checks: clang-tidy: warning: invalid case style for function 'HostToLE' [readability-identifier-naming]… | |||||
Maybe name it HostToLE? kcc: Maybe name it HostToLE? | |||||
Ok - clang-tidy might not like it, but let's see. iii: Ok - clang-tidy might not like it, but let's see. | |||||
Yeah: invalid case style for function 'HostToLE'. Suggested name is 'hostToLe'. iii: Yeah: invalid case style for function 'HostToLE'. Suggested name is 'hostToLe'.
Would it be ok… | |||||
I don't mind. kcc: I don't mind.
hostToLe is fine too. | |||||
#else | |||||
template <typename T> T HostToLE(T X) { return Bswap(X); } | |||||
#endif | |||||
} // namespace fuzzer | } // namespace fuzzer | ||||
#endif // LLVM_FUZZER_UTIL_H | #endif // LLVM_FUZZER_UTIL_H |
clang-tidy: warning: invalid case style for function 'HostToLE' [readability-identifier-naming]
not useful