Fix generating bindings for functions named `operator1`.
I realized that `generate_func` in `src_code_gen.rs` was incorrectly
looking just at the presence of the "operator" prefix to determine
if something is an operator VS a regular function.
PiperOrigin-RevId: 427337548
diff --git a/rs_bindings_from_cc/importer.cc b/rs_bindings_from_cc/importer.cc
index 35ad45f..455670f 100644
--- a/rs_bindings_from_cc/importer.cc
+++ b/rs_bindings_from_cc/importer.cc
@@ -1011,12 +1011,7 @@
// clang-format off
#define OVERLOADED_OPERATOR(name, spelling, ...) \
case clang::OO_##name: { \
- std::string name = "operator"; \
- if ('a' <= spelling[0] && spelling[0] <= 'z') { \
- absl::StrAppend(&name, " "); \
- } \
- absl::StrAppend(&name, spelling); \
- return {Identifier(std::move(name))}; \
+ return {Operator(spelling)}; \
}
#include "third_party/llvm/llvm-project/clang/include/clang/Basic/OperatorKinds.def"
#undef OVERLOADED_OPERATOR