llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/242977.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Pointer.h (-14) ``````````diff diff --git a/clang/lib/AST/ByteCode/Pointer.h b/clang/lib/AST/ByteCode/Pointer.h index 04aaacd5d96512..f1dcc5637455d0 100644 --- a/clang/lib/AST/ByteCode/Pointer.h +++ b/clang/lib/AST/ByteCode/Pointer.h @@ -1286,20 +1286,6 @@ class Pointer { [[nodiscard]] Pointer stripBaseCasts() const { return Pointer(view().stripBaseCasts()); } - - /// Compare two pointers. - ComparisonCategoryResult compare(const Pointer &Other) const { - if (!hasSameBase(*this, Other)) - return ComparisonCategoryResult::Unordered; - - if (Offset < Other.Offset) - return ComparisonCategoryResult::Less; - if (Offset > Other.Offset) - return ComparisonCategoryResult::Greater; - - return ComparisonCategoryResult::Equal; - } - /// Checks if two pointers are comparable. static bool hasSameBase(const Pointer &A, const Pointer &B); /// Checks if two pointers can be subtracted. `````````` </details> https://github.com/llvm/llvm-project/pull/242977 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
