[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-09-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D132727#3779237 , @tbaeder wrote: > Thanks @MaskRay, I thought this was fixed by > https://github.com/llvm/llvm-project/commit/86271798e51a7866dd2af44e0ee183d1331089e6, > at least all the emails I got about failing msan build

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-09-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Thanks @MaskRay, I thought this was fixed by https://github.com/llvm/llvm-project/commit/86271798e51a7866dd2af44e0ee183d1331089e6, at least all the emails I got about failing msan builds were missing that change. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-09-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Heads-up: after D132832 and D132727 , clang/test/AST/Interp/arrays.cpp.test has a msan failure. It can be pre-existing or can be newly introduced. There seems another issue about an integer overflow in

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-09-07 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 rG3a7d476087df: [clang][Interp] Implement array initializers and subscript expressions (authored by tbaeder). Repository: rG LLVM Github Monorepo C

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-09-07 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/D132727/new/ https://reviews.llvm.org/D132727 ___ cfe-commits mailing lis

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-09-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 457767. tbaeder marked 6 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132727/new/ https://reviews.llvm.org/D132727 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/In

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-09-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:277 +template +bool ByteCodeExprGen::VisitConstantExpr (const ConstantExpr *E) { + // TODO: Check if the ConstantExpr already has a value set and if so, ===

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 456953. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132727/new/ https://reviews.llvm.org/D132727 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/In

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:41-44 +template +constexpr T getElementOf(T* array, int i) { + return array[i]; +} aaron.ballman wrote: > A similar test we might want to add (w

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132727#3755843 , @tbaeder wrote: > In D132727#3755571 , @aaron.ballman > wrote: > >> Precommit CI found a relevant failure: > > That needs the lvalue-to-rvalue conversion patch

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D132727#3755571 , @aaron.ballman wrote: > Precommit CI found a relevant failure: That needs the lvalue-to-rvalue conversion patch first. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132727/new/ https://reviews.llv

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 456376. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132727/new/ https://reviews.llvm.org/D132727 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/lib/AST/I

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Precommit CI found a relevant failure: FAIL: Clang :: AST/Interp/arrays.cpp (67 of 15858) TEST 'Clang :: AST/Interp/arrays.cpp' FAILED Script: -- : 'RUN: at line 1'; c:\ws\w5\llvm-project\premerge-checks\build\

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:535 + + // TODO: Fillers? + if (const auto *InitList = dyn_cast(Initializer)) { erichkeane wrote: > Heh, THIS is a huge "TODO" here. The ArrayFillers go through a ton of > twi

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Nothing suspicious as far as I can tell, other than just punting on ArrayFillers. Don't understand enough of this code to just do a straight-up approval though, so hopefully one of the other reviewers can take a look and confirm with another uninformed opinion :)

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:56 +// LValuePath correctly. +//static_assert(data[0] == 4); + tbaeder wrote: > This is quite unfortunate, but it only fails when evaluating `data[0]` by > itself, when printing the extr

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 455873. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132727/new/ https://reviews.llvm.org/D132727 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/lib/AST/I

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 455849. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132727/new/ https://reviews.llvm.org/D132727 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/lib/AST/I

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:43 protected: - // Emitters for opcodes of various arities. - using NullaryFn = bool (ByteCodeExprGen::*)(const SourceInfo &); - using UnaryFn = bool (ByteCodeExprGen::*)(PrimType, const SourceI

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:553 +if (!visitArrayInitializer(Init)) + return false; +if (!this->emitPopPtr(Init)) I've been wondering about a macro to simplify code like this, e.g. `d

[PATCH] D132727: [clang][Interp] Implement array initializers and subscript expressions

2022-08-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, shafik, erichkeane, tahonermann. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. It took me a pretty long time to get the patch this