From bfbed2ad9c2540be4a2d8360ca322a9634f7ca91 Mon Sep 17 00:00:00 2001 From: Tony Liao Date: Mon, 13 Jan 2025 10:37:46 -0800 Subject: [PATCH] Add an explicit null check so that ClangTidy doesn't complain about nullable pointers. PiperOrigin-RevId: 715026649 --- src/google/protobuf/compiler/cpp/parse_function_generator.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/google/protobuf/compiler/cpp/parse_function_generator.cc b/src/google/protobuf/compiler/cpp/parse_function_generator.cc index 1017f4290ebf..70a70f1f7740 100644 --- a/src/google/protobuf/compiler/cpp/parse_function_generator.cc +++ b/src/google/protobuf/compiler/cpp/parse_function_generator.cc @@ -226,6 +226,7 @@ static NumToEntryTable MakeNumToEntryTable( start_new_block = false; } + ABSL_DCHECK(block != nullptr); auto skip_entry_num = (fnum - block->first_fnum) / 16; auto skip_entry_index = (fnum - block->first_fnum) % 16; while (skip_entry_num >= block->entries.size())