[PATCH] D78938: Fixing all comparisons for C++20 compilation.

Richard Smith - zygoloid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 12:22:53 PDT 2020


rsmith added inline comments.


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:64-67
+    return Value == unsigned(V);
+  }
+  bool operator!=(OpenMPDirectiveKindExWrapper V) const {
+    return Value != unsigned(V);
----------------
Comparing against `V.Value` here would seem more idiomatic than invoking `operator unsigned`.


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:69-70
+  }
   bool operator==(OpenMPDirectiveKind V) const { return Value == unsigned(V); }
   bool operator!=(OpenMPDirectiveKind V) const { return Value != unsigned(V); }
   bool operator<(OpenMPDirectiveKind V) const { return Value < unsigned(V); }
----------------
Do we still need these?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78938/new/

https://reviews.llvm.org/D78938





More information about the llvm-commits mailing list