[all-commits] [llvm/llvm-project] b59461: [ADT] Add back ability to compare StringSet (#91374)

Aleksandr Platonov via All-commits all-commits at lists.llvm.org
Wed May 8 09:40:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b59461ac63aa1770a617f96bab31010442bd2090
      https://github.com/llvm/llvm-project/commit/b59461ac63aa1770a617f96bab31010442bd2090
  Author: Aleksandr Platonov <platonov.aleksandr at huawei.com>
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
    M llvm/include/llvm/ADT/StringMap.h
    M llvm/unittests/ADT/StringSetTest.cpp

  Log Message:
  -----------
  [ADT] Add back ability to compare StringSet (#91374)

StringSet comparison was broken after moving from llvm::Optional to
std::optional because std::nullopt_t is not equality-comparable. Without
this patch a try to compare objects of StringSet type leads to
compilation error:
```
llvm-project/llvm/include/llvm/ADT/StringMap.h:294:33: error: no match for ‘operator==’ (operand types are ‘std::nullopt_t’ and ‘std::nullopt_t’)
294 |       if (!(KeyValue.getValue() == FindInRHS->getValue()))
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list