Files
clang-p2996/clang-tools-extra/modularize
Ilya Biryukov cf9374933d [Modularize] Make Location::operator bool explicit
This unbreaks C++20 buildbot that was broken since
402baea0a9.

With implicit conversion in C++20 compilation mode the spaceship
will unintentionally be based on `operator bool`:

```cpp
auto foo(Location L, Location R) {
  return L <=> R;
  // Equivalent to the following line due to implicit conversions.
  // return L.operator bool() <=> R.operator bool();
}
```

The spaceship operator is rarely used explicitly, but its implicit uses
in the STL may cause surprising results, as exposed by the use of  `std::tie`
in 402baea0a9, which ended up changing the
comparisons results unintentionally.
2025-07-01 16:38:07 +02:00
..