[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-18 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. This patch is causing breakages downstream because it didn't have do the struct dance, so I've added D148677 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://reviews.llvm.o

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Hi folks! We have a setup in which clang (more specifically clang-tools) is always built from a version close to HEAD and libcxx is fetched from user's checkout of the codebase (which can lag behind HEAD for ~a month). So the 1 week gap between https://github.com/llvm

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-17 Thread Nikolas Klauser via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe98776a180a7: [clang] Add __is_trivially_equality_comparable (authored by philnik). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://review

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://reviews.llvm.org/D147175

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-16 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. ping @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://reviews.llvm.org/D147175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-10 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added inline comments. Comment at: libcxx/include/__type_traits/is_equality_comparable.h:46 template -struct __is_trivially_equality_comparable +struct __libcpp_is_trivially_equality_comparable : integral_constant philnik wrote: > > Mordante wrote: > > > This does

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-10 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 512201. philnik marked 3 inline comments as done. philnik added a comment. - Moved libc++ changes into it's own PR - Rebased - Fixed `enum` false-positive Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147175#4251852 , @philnik wrote: > In D147175#4251076 , @aaron.ballman > wrote: > >> One thing I can't quite determine is whether we expect to call this type >> trait often or

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-08 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: libcxx/include/__type_traits/is_equality_comparable.h:46 template -struct __is_trivially_equality_comparable +struct __libcpp_is_trivially_equality_comparable : integral_constant Mordante wrote: > > This does not magically use th

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-08 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik marked an inline comment as done. philnik added inline comments. Comment at: libcxx/include/__type_traits/is_equality_comparable.h:46 template -struct __is_trivially_equality_comparable +struct __libcpp_is_trivially_equality_comparable : integral_constant This does

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-08 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I mainly glossed over the patch and didn't do a real review. Comment at: clang/lib/AST/ASTContext.cpp:2672 +const RecordDecl *RD, +bool CheckIfTriviallyCOpy

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-07 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D147175#4251076 , @aaron.ballman wrote: > One thing I can't quite determine is whether we expect to call this type > trait often or not. Are either of the uses in libc++ going to be instantiated > frequently? I'm trying to f

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-07 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 511762. philnik marked 2 inline comments as done. philnik added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://reviews.llvm.org/D147175 Files: clang/docs/Langua

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147175#4249212 , @philnik wrote: > In D147175#4246513 , @aaron.ballman > wrote: > >> Ah, I like this approach -- it keeps things roughly in sync with checking >> for unique obj

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-06 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D147175#4246513 , @aaron.ballman wrote: > Ah, I like this approach -- it keeps things roughly in sync with checking for > unique object representations, which is great. I spotted a few questions, but > in general this is hea

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-06 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 511460. philnik marked 4 inline comments as done. philnik added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://reviews.llvm.org/D147175 Files: clang/docs/Langua

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ah, I like this approach -- it keeps things roughly in sync with checking for unique object representations, which is great. I spotted a few questions, but in general this is heading in the right direction. You should also add a release note to clang/docs/ReleaseN

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-04 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 510887. philnik added a comment. Remove formatting changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://reviews.llvm.org/D147175 Files: clang/docs/LanguageExtensions.rst clang/include/

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-04 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 510865. philnik marked 5 inline comments as done. philnik added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new/ https://reviews.llvm.org/D147175 Files: clang/docs/Langua

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-04 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D147175#4240572 , @aaron.ballman wrote: > Hmmm, is this effectively `std::has_unique_object_representations` (ensuring > that all bits of the object representation contribute to the value)? These two traits are indeed very s

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Hmmm, is this effectively `std::has_unique_object_representations` (ensuring that all bits of the object representation contribute to the value)? Comment at: clang/lib/AST/Type.cpp:2610 + + if (const auto *RecordDecl = CanonicalType->getAsCXXRec

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-03-30 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:3315 Builder.Alignment, Builder.Alignment, CharUnits::Zero(), Builder.PrimaryBase, false, Builder.SharedVBPtrBase, + Builder.EndsWithZeroSizedObject, Builder.LeadsWithZe

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-03-30 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik updated this revision to Diff 509598. philnik added a comment. Herald added a project: libc++. Herald added a subscriber: libcxx-commits. Herald added a reviewer: libc++. Try to fix CI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147175/new

[PATCH] D147175: [clang] Add __is_trivially_equality_comparable

2023-03-29 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik created this revision. philnik added a reviewer: aaron.ballman. Herald added a project: All. philnik requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds a new trait to allow standard libraries to forward `std::equal` ca