diff options
| author | heretic <[email protected]> | 2022-06-16 13:57:26 +0300 | 
|---|---|---|
| committer | heretic <[email protected]> | 2022-06-16 13:57:26 +0300 | 
| commit | b6cbf7994aced152d09f4583e6e7f5d72f7f71da (patch) | |
| tree | 7cc8516775e3b39e9b8ff471d8daa79749b50b74 | |
| parent | ecf080194ff9dbff607508d20afaaba010bc18c3 (diff) | |
protobuf: fix noapacheupper asan problem DEVTOOLSSUPPORT-19818
ref:a38b5ca2d36fc460a2166dfd24c6ae66b17f2d1f
| -rw-r--r-- | contrib/libs/protobuf/src/google/protobuf/descriptor.cc | 10 | 
1 files changed, 4 insertions, 6 deletions
diff --git a/contrib/libs/protobuf/src/google/protobuf/descriptor.cc b/contrib/libs/protobuf/src/google/protobuf/descriptor.cc index 2ecffe85c99..dffc45d72e2 100644 --- a/contrib/libs/protobuf/src/google/protobuf/descriptor.cc +++ b/contrib/libs/protobuf/src/google/protobuf/descriptor.cc @@ -543,8 +543,6 @@ struct PointerStringPairHash {  }; -const Symbol kNullSymbol; -  struct SymbolByFullNameHash {    size_t operator()(Symbol s) const {      return HASH_FXN<StringPiece>{}(s.full_name()); @@ -1401,7 +1399,7 @@ inline Symbol DescriptorPool::Tables::FindSymbol(StringPiece key) const {    Symbol::QueryKey name;    name.name = key;    auto it = symbols_by_name_.find(Symbol(&name)); -  return it == symbols_by_name_.end() ? kNullSymbol : *it; +  return it == symbols_by_name_.end() ? Symbol() : *it;  }  inline Symbol FileDescriptorTables::FindNestedSymbol( @@ -1410,7 +1408,7 @@ inline Symbol FileDescriptorTables::FindNestedSymbol(    query.name = name;    query.parent = parent;    auto it = symbols_by_parent_.find(Symbol(&query)); -  return it == symbols_by_parent_.end() ? kNullSymbol : *it; +  return it == symbols_by_parent_.end() ? Symbol() : *it;  }  Symbol DescriptorPool::Tables::FindByNameHelper(const DescriptorPool* pool, @@ -4269,7 +4267,7 @@ Symbol DescriptorBuilder::FindSymbol(const TProtoStringType& name, bool build_it    possible_undeclared_dependency_ = file;    possible_undeclared_dependency_name_ = name; -  return kNullSymbol; +  return Symbol();  }  Symbol DescriptorBuilder::LookupSymbolNoPlaceholder( @@ -4397,7 +4395,7 @@ Symbol DescriptorPool::NewPlaceholderWithMutexHeld(    StringPiece placeholder_name;    const TProtoStringType* placeholder_package; -  if (!ValidateQualifiedName(name)) return kNullSymbol; +  if (!ValidateQualifiedName(name)) return Symbol();    if (name[0] == '.') {      // Fully-qualified.      placeholder_full_name = name.substr(1);  | 
