brintos

brintos / llvm-project-archived public Read only

0
0
Text · 496 B · d42799f Raw
20 lines · cpp
1// RUN: %clang_analyze_cc1 -std=c++20 -w -analyzer-checker=core -verify %s2 3// expected-no-diagnostics4 5namespace std {6struct strong_ordering {7  int n;8  constexpr operator int() const { return n; }9  static const strong_ordering equal, greater, less;10};11constexpr strong_ordering strong_ordering::equal = {0};12constexpr strong_ordering strong_ordering::greater = {1};13constexpr strong_ordering strong_ordering::less = {-1};14} // namespace std15 16void test() {17  // no crash18  (void)(0 <=> 0);19}20