From b1b07fb2c15866ff29d9500f386ff2e39b2b8e44 Mon Sep 17 00:00:00 2001 From: J2ObjC Team Date: Sun, 21 Jun 2026 00:28:22 -0700 Subject: [PATCH] Add 'bool', 'char', and 'short' to J2ObjC keyword blacklist. This prevents symbol collisions when a proto field is named 'bool', 'char', or 'short', which can happen when generating Objective-C properties that use C++ keywords. PiperOrigin-RevId: 935529441 --- .../src/google/protobuf/compiler/j2objc/j2objc_helpers.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protobuf/compiler/src/google/protobuf/compiler/j2objc/j2objc_helpers.cc b/protobuf/compiler/src/google/protobuf/compiler/j2objc/j2objc_helpers.cc index fe646b7776..340aec83eb 100644 --- a/protobuf/compiler/src/google/protobuf/compiler/j2objc/j2objc_helpers.cc +++ b/protobuf/compiler/src/google/protobuf/compiler/j2objc/j2objc_helpers.cc @@ -85,8 +85,10 @@ const std::set kKeywords = { "accessibilityLabel", "and", "auto", + "bool", "break", "case", + "char", "class", "concept", "const", @@ -122,6 +124,7 @@ const std::set kKeywords = { "return", "self", "shared", + "short", "signed", "static", "struct",