[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-15 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG976d8b40cccf: [clang][Interp] Virtual function calls (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D142630?vs=527336&id=531697#toc Repository: rG LLVM Github Monorepo CHAN

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-13 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 Comment at: clang/test/AST/Interp/records.cpp:650 +}; +#endif tbaeder wrote: > aaron.ballman wrote: > > We should also have test cases for

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/records.cpp:650 +}; +#endif aaron.ballman wrote: > We should also have test cases for calling virtual functions from within a > constructor and a destructor, as that has special semantics. e.g., >

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1560 + // is the furthest we might go up in the hierarchy. + ThisPtr = ThisPtr.getDeclPtr(); +} tbaeder wrote: > I think this test case was from the function pointer revi

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 527336. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142630/new/ https://reviews.llvm.org/D142630 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Context.cpp clang/lib/AST/Interp/Context.h clang/lib/AST/Interp/Descriptor

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1560 + // is the furthest we might go up in the hierarchy. + ThisPtr = ThisPtr.getDeclPtr(); +} tbaeder wrote: > Just so I don't forget: The assignment to `ThisPtr` here is dea

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-06-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 527331. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142630/new/ https://reviews.llvm.org/D142630 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Context.cpp clang/lib/AST/Interp/Context.h clang/lib/AST/Interp/Descriptor

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-05-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1560 + // is the furthest we might go up in the hierarchy. + ThisPtr = ThisPtr.getDeclPtr(); +} Just so I don't forget: The assignment to `ThisPtr` here is dead. Repository:

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-05-11 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/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-05-01 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/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-04-21 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/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-04-13 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/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-03-23 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 507648. tbaeder added a comment. Add some more tests for virtual destructors. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142630/new/ https://reviews.llvm.org/D142630 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Contex

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-03-01 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 501506. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142630/new/ https://reviews.llvm.org/D142630 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Context.cpp clang/lib/AST/Interp/C

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-03-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. (Still thinking about the implementation work here, mostly just drive-by comments at the moment. My gut instinct is that we've not got sufficient test coverage here, but that might be partially because of other parts of the interpreter not being ready yet.) ===

[PATCH] D142630: [clang][Interp] Implement virtual function calls

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

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-02-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1560 + // is the furthest we might go up in the hierarchy. + ThisPtr = ThisPtr.getDeclPtr(); +} I think this test case was from the function pointer review, but this fixes: ```

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-02-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 497276. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142630/new/ https://reviews.llvm.org/D142630 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Context.cpp clang/lib/AST/Interp/Context.h clang/lib/AST/Interp/Descriptor

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-02-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 495789. tbaeder set the repository for this revision to rG LLVM Github Monorepo. tbaeder added a comment. Fixed all the new test cases by adding a new `CallVirt` opcode and only using that if appropriate. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D142630#4110839 , @tbaeder wrote: > Hmm, this doesn't work if the callee is somewhere in between the path from > the dynamic to the static type, e.g. > > struct A { > virtual constexpr int foo() const { return 1; }

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-02-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Hmm, this doesn't work if the callee is somewhere in between the path from the dynamic to the static type, e.g. struct A { virtual constexpr int foo() const { return 1; } }; struct B : A { virtual constexpr int foo() const { return A::foo(); } };

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-02-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 495059. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142630/new/ https://reviews.llvm.org/D142630 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Context.cpp clang/lib/AST/Interp/Context.h clang/lib/AST/Interp/Function.h

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-02-04 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/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-01-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. @aaron.ballman Not sure if this (the added early re