[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 09:59:14 PDT 2023
aaron.ballman added inline comments.
================
Comment at: clang/lib/AST/Interp/Pointer.h:81-88
+ /// Equality operators are just for tests.
+ bool operator==(const Pointer &P) const {
+ return Pointee == P.Pointee && Base == P.Base && Offset == P.Offset;
+ }
+
+ bool operator!=(const Pointer &P) const {
+ return Pointee != P.Pointee || Base != P.Base || Offset != P.Offset;
----------------
tbaeder wrote:
> aaron.ballman wrote:
> > Same here -- can these be private and friended?
> Don't you need a class to friend something? I only have the `TEST(...)` function in the unit test, so I can't do that, right?
`FRIEND_TEST` does this, I believe: https://google.github.io/googletest/reference/testing.html#FRIEND_TEST
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158069/new/
https://reviews.llvm.org/D158069
More information about the cfe-commits
mailing list