[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-09-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/complex.cpp:119-124 + using Bobble = _Complex float; + constexpr _Complex float A = { 13.0, 2.0 }; + constexpr Bobble B = { 2.0, 1.0 }; + constexpr _Complex float D = A - B; + static_assert(__real(D) == 11.0,

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-09-28 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. In D155572#4646353 , @tbaeder wrote: > In D155572#4645997 , @aaron.ballman > wrote: > >>

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-09-22 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155572/new/ https://reviews.llvm.org/D155572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-09-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 556825. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155572/new/ https://reviews.llvm.org/D155572 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/test/AST/Interp/complex.cpp Index:

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-09-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D155572#4645997 , @aaron.ballman wrote: > Hmmm, I think the answer is "no"... and "maybe." `_Complex` can only be > followed by `float`, `double`, or `long double` specifically per the C > standard. However, we also support

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-09-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D155572#4645995 , @tbaeder wrote: > In D155572#4542484 , @aaron.ballman > wrote: > >> In D155572#4541403 , @tbaeder >> wrote: >> >>>

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-09-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D155572#4542484 , @aaron.ballman wrote: > In D155572#4541403 , @tbaeder wrote: > >> In D155572#4539457 , >> @aaron.ballman wrote: >> >>> Is

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D155572#4541403 , @tbaeder wrote: > In D155572#4539457 , @aaron.ballman > wrote: > >> Is this intended to not handle all the binary operators in this patch? > > Yes, just a

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-07-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D155572#4539457 , @aaron.ballman wrote: > Is this intended to not handle all the binary operators in this patch? Yes, just a subset for now. > And also, is this intended to only impact initializers? Yes, due to problems

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-07-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Is this intended to not handle all the binary operators in this patch? And also, is this intended to only impact initializers? Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:587-588 + const Expr *RHS = E->getRHS(); + PrimType LHSElemT =

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155572/new/ https://reviews.llvm.org/D155572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-07-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo