Fix 5 ClangTidyReadability findings:
* function 'QuicConnectionIdHasher' has inline specifier but is implicitly inlined. For more info, see go/clang_tidy/checks/readability-redundant-inline-specifier (2 times)
* function 'ReviseFirstByteByVersion' has inline specifier but is implicitly inlined. For more info, see go/clang_tidy/checks/readability-redundant-inline-specifier (2 times)
* function 'Hash' has inline specifier but is implicitly inlined. For more info, see go/clang_tidy/checks/readability-redundant-inline-specifier
This CL looks good? Just grant approval!
This CL doesn’t look good? This is what you can do:
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/clang-tidy-bug for category ClangTidyReadability if there's an issue with the CL content.
* File a bug under go/rosie-bug if there's an issue with how the CL was managed.
* For all other issues such as the formatting of the CL, please file a bug under
go/clrobot-bug.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.
This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/third_party/quiche/METADATA.common which is reachable following include_presubmits from //depot/google3/third_party/quic/METADATA by
following go/clrobot#how-to-opt-in. Anything wrong with the signup? File a bug
at go/clrobot-bug.
#clrobot #readability-redundant-inline-specifier
Tested:
Local presubmit tests passed.
PiperOrigin-RevId: 927644629
diff --git a/quiche/quic/core/quic_connection_id.cc b/quiche/quic/core/quic_connection_id.cc
index 5ef1dac..d0a351c 100644
--- a/quiche/quic/core/quic_connection_id.cc
+++ b/quiche/quic/core/quic_connection_id.cc
@@ -28,14 +28,14 @@
// that they always land in the same hash bucket.
class QuicConnectionIdHasher {
public:
- inline QuicConnectionIdHasher()
+ QuicConnectionIdHasher()
: QuicConnectionIdHasher(QuicRandom::GetInstance()) {}
- explicit inline QuicConnectionIdHasher(QuicRandom* random) {
+ explicit QuicConnectionIdHasher(QuicRandom* random) {
random->RandBytes(&sip_hash_key_, sizeof(sip_hash_key_));
}
- inline size_t Hash(const char* input, size_t input_len) const {
+ size_t Hash(const char* input, size_t input_len) const {
return static_cast<size_t>(SIPHASH_24(
sip_hash_key_, reinterpret_cast<const uint8_t*>(input), input_len));
}
diff --git a/quiche/quic/core/quic_framer_test.cc b/quiche/quic/core/quic_framer_test.cc
index 3d3ae5d..004092a 100644
--- a/quiche/quic/core/quic_framer_test.cc
+++ b/quiche/quic/core/quic_framer_test.cc
@@ -747,12 +747,12 @@
// not needed for short header packets, but if sent, this function will exit
// cleanly. It needs to be called twice for coalesced packets (see references
// to length_of_first_coalesced_packet below for examples of how to do this).
- inline void ReviseFirstByteByVersion(unsigned char packet_ietf[]) {
+ void ReviseFirstByteByVersion(unsigned char packet_ietf[]) {
if (version_.UsesV2PacketTypes() && (packet_ietf[0] >= 0x80)) {
packet_ietf[0] = (packet_ietf[0] + 0x10) | 0xc0;
}
}
- inline void ReviseFirstByteByVersion(PacketFragments& packet_ietf) {
+ void ReviseFirstByteByVersion(PacketFragments& packet_ietf) {
ReviseFirstByteByVersion(&packet_ietf[0].fragment[0]);
}