[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/unittests/AST/Interp/CMakeLists.txt:2 +add_clang_unittest(InterpTests + Descriptor.cpp + ) thakis wrote: > Why is this in a separate executable instead of in ASTTests? So it can have > fewer deps? Mostly because

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/unittests/AST/Interp/CMakeLists.txt:2 +add_clang_unittest(InterpTests + Descriptor.cpp + ) Why is this in a separate executable instead of in ASTTests? So it can have fewer deps? Repository: rG LLVM Github Mo

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-12 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2f43ace0f48f: [clang][Interp] Fix expected values for Pointer API (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D158069

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-11 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158069/new/ https://reviews.llvm.org/D158069 ___ cfe-commits mailing lis

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 557656. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158069/new/ https://reviews.llvm.org/D158069 Files: clang/lib/AST/Interp/Context.h clang/lib/AST/Interp/Pointer.h clang/unittests/AST/CMakeLists.txt clang/unittests/AST/Interp/CMakeLists.t

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-09 Thread Aaron Ballman via Phabricator via cfe-commits
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!=(con

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder 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 Poi

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-04 Thread Aaron Ballman via Phabricator via cfe-commits
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!=(con

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder 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 Poi

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-02 Thread Aaron Ballman via Phabricator via cfe-commits
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!=(con

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-09-30 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder 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 Poi

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-09-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Context.h:88 + /// Returns the program. This is only needed for unittests. + Program &getProgram() const { return *P.get(); } + tbaeder wrote: > cor3ntin wrote: > > This should return a const

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

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

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-09-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Context.h:88 + /// Returns the program. This is only needed for unittests. + Program &getProgram() const { return *P.get(); } + cor3ntin wrote: > This should return a const ref Things like `getGlob

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-09-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 557097. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158069/new/ https://reviews.llvm.org/D158069 Files: clang/lib/AST/Interp/Context.h clang/lib/AST/Interp/Pointer.h clang/unittests/AST/CMakeLists.txt

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-08-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/Interp/Context.h:88 + /// Returns the program. This is only needed for unittests. + Program &getProgram() const { return *P.get(); } + This should return a const ref Comment at: clang/

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-08-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 550696. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158069/new/ https://reviews.llvm.org/D158069 Files: clang/lib/AST/Interp/Context.h clang/lib/AST/Interp/Pointer.h clang/unittests/AST/CMakeLists.txt clang/unittests/AST/Interp/CMakeLists.t

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-08-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added subscribers: ChuanqiXu, arphaman. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Reposit