[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-10 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 rG0dcfd0ce020b: [clang][Interp] Support alignof() (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473708. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/class-layout.cpp clang/test/AST/Interp/cxx20.cpp Index: clang/test/AST/Int

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-07 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473707. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/class-layout.cpp clang/test/AST/I

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In D137240#3909034 , @tbaeder wrote: > It's not really all that interesting since the current interpreter already > does all the work, but it works like this. Ahhh okay, that makes sen

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473316. tbaeder added a comment. It's not really all that interesting since the current interpreter already does all the work, but it works like this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 Files

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D137240#3908229 , @tbaeder wrote: > Oh, this doesn't work: > > void test_alignas_operand() { > alignas(8) char dummy; > static_assert(__alignof(dummy) == 8); > } That's interesting! Based on the code, I would

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Oh, this doesn't work: void test_alignas_operand() { alignas(8) char dummy; static_assert(__alignof(dummy) == 8); } CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 ___

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-03 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/lib/AST/Interp/ByteCodeExprGen.cpp:444 +// alignment of the referenced type. +if (const ReferenceType *Ref = ArgType->getAs()

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 472855. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/class-layout.cpp Index: clang/test/AST/Interp/class-layout.cpp =

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:444 +// alignment of the referenced type. +if (const ReferenceType *Ref = ArgType->getAs()) + ArgType = Ref->getPointeeType(); aaron.ballman wrote: > You're missi

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:444 +// alignment of the referenced type. +if (const ReferenceType *Ref = ArgType->getAs()) + ArgType = Ref->getPointeeType(); You're missing the rest of th

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 472564. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/class-layout.cpp Index: clang/test/AST/Interp/class-layout.cpp =

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 472563. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/class-layout.cpp Index: clang/test/AST/Interp/class-layout.cpp =

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 472562. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/class-layout.cpp Index: clang/test/AST/Interp/class-layout.cpp =

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-02 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. The test is just a copy of `clang/test/SemaCXX/clas