Skip to content

Clang-tidy: modernize-use-nullptr produces a false-positive on std:: strong_ordering (spaceship operator result) #63478

Closed
@fastasturtle

Description

@fastasturtle
#include <compare>

int main() {
    auto res = 0 <=> 1;
    if (res < 0) {} // warning: use nullptr [modernize-use-nullptr]
}

https://gcc.godbolt.org/z/89W17v8j7

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions