<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64159>64159</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang-Tidy raises modernize-use-nullptr with spaceship operator
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
andrea-cassioli-maersk
</td>
</tr>
</table>
<pre>
Reopening https://github.com/llvm/llvm-project/issues/53961 as it seems to me the issue is not solved.
I have a simple `struct`
```
#include <compare>
struct X {
double a = 0.0;
double b = 0.0;
double c = 0.0;
X() = default;
X(const X&) = default;
explicit X(double x);
X& operator=(const X& other) = default;
// NOLINTNEXTLINE(modernize-use-nullptr)
std::partial_ordering operator<=>(const X&) const = default;
};
```
if I run `clang-tidy` I get an error
```
Resource filename: /opt/homebrew/lib/python3.11/site-packages/clang_tidy/data/bin/clang-tidy
/Users/***/***.h:23:77: error: use nullptr [modernize-use-nullptr,-warnings-as-errors]
std::partial_ordering operator<=>(const X&) const = default;
^
nullptr
```
Am I missing anything here?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VE1r5DgQ_TXlS-HGLfnz4ENPOoaGIQtDFnIbZLu6rR3ZMio5meyvX2SnN9lNMoeFBdMtu0pVT_WenmLWl4mohuwLZMdILX6wrlZT70jFXQhbo-NRkeMfUWv75_ob2ZkmPV1w8H5mkAcQDYjmov2wtLvOjiAaYx6vf_Hs7B_UeRCNZl6IQTSZrPI9KkbtkYlGRm9xJPQD4ZqEmnGyHtmaR-p3kBwhOWy_JxzUI6FC1uNsCCFP2Lul85Anb_PC6_a8_Siknjqz9IQgbzo7zsoRyNu3OVs1fEAovmxfEHu7tCY0BXnEZJeA_HeofR96iXTvItetDyBKENUa7-msFuPfFA7Rzk7swyr_NI9-zkZ3es0qX1r-BFF91C1HO5NT3jqQx3-UR-sHcp822SjGu9--nu7u724f7r-e7m5BlKPtyU36T4oXpnhajJl9qHLtyb4PApGHWTmvlfluXU8uiOcVyE3AIm_fnXZ7-wgOFMfX9Uc06zOe0C1TEEdn1HSJve6fIU_whBfyqCYk56z7hV6-EdvFdYRnbWhSI4Fcx2DnoOTBjtQ6egoa1y2IZn72g53kbr8H0bD2FM-q-6Euq9xXCN9XCKLplVcgmlZP18gKDq8CbX5ncrwO_HB9Xte7AeRBSJCHogiItmPIAy5M-DJ_hOzLJ8TcxE_KhcvLseJ43cyQHf9fuhCylwt2RfgL6g4jnnDUzKGrmp79sFoNhWvabClRX8u-kpWKqN7nVZLmIi1lNNRlee4LeT4XQlWlyMokVXmWilSWCZVlm0S6FomQSSGKvcjSVO6qoqQyL6o8o-6c92dIExqVNrvgXDvrLtFqR3We7rMqMqolw6tXCjHR0-ZVIESwTlevbtcuF4Y0MZo9v1bx2huqb1a27wPbTmkmxg9pQnzSfkCeVUc86Pnv4UeLM_V_d931EH8FAAD__w1lxtY">