[PATCH] D78938: Fixing all comparisons for C++20 compilation.
Barry Revzin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 27 15:39:47 PDT 2020
BRevzin updated this revision to Diff 260477.
BRevzin added a comment.
More idiomatic comparison implementation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78938/new/
https://reviews.llvm.org/D78938
Files:
clang/lib/Parse/ParseOpenMP.cpp
Index: clang/lib/Parse/ParseOpenMP.cpp
===================================================================
--- clang/lib/Parse/ParseOpenMP.cpp
+++ clang/lib/Parse/ParseOpenMP.cpp
@@ -61,10 +61,10 @@
OpenMPDirectiveKindExWrapper(unsigned Value) : Value(Value) {}
OpenMPDirectiveKindExWrapper(OpenMPDirectiveKind DK) : Value(unsigned(DK)) {}
bool operator==(OpenMPDirectiveKindExWrapper V) const {
- return Value == unsigned(V);
+ return Value == V.Value;
}
bool operator!=(OpenMPDirectiveKindExWrapper V) const {
- return Value != unsigned(V);
+ return Value != V.Value;
}
bool operator==(OpenMPDirectiveKind V) const { return Value == unsigned(V); }
bool operator!=(OpenMPDirectiveKind V) const { return Value != unsigned(V); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78938.260477.patch
Type: text/x-patch
Size: 764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200427/46e273dc/attachment-0001.bin>
More information about the cfe-commits
mailing list