[PATCH] D155809: [NFC] [Clang] Fix strict weak ordering in ItaniumVTableBuilder
Danila Kutenin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 20 06:38:39 PDT 2023
danlark updated this revision to Diff 542492.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155809/new/
https://reviews.llvm.org/D155809
Files:
clang/lib/AST/VTableBuilder.cpp
Index: clang/lib/AST/VTableBuilder.cpp
===================================================================
--- clang/lib/AST/VTableBuilder.cpp
+++ clang/lib/AST/VTableBuilder.cpp
@@ -1560,6 +1560,8 @@
std::stable_sort(
NewImplicitVirtualFunctions.begin(), NewImplicitVirtualFunctions.end(),
[](const CXXMethodDecl *A, const CXXMethodDecl *B) {
+ if (A == B)
+ return false;
if (A->isCopyAssignmentOperator() != B->isCopyAssignmentOperator())
return A->isCopyAssignmentOperator();
if (A->isMoveAssignmentOperator() != B->isMoveAssignmentOperator())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155809.542492.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230720/34b5154b/attachment.bin>
More information about the cfe-commits
mailing list