[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 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] D137386: [clang][Interp] Reject invalid declarations and expressions

2022-11-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473939. tbaeder added a comment. Tried to find an example for an invalid declaration but couldn't even manage to find one :| CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137386/new/ https://reviews.llvm.org/D137386 Files: clang/lib/AST/Interp/B

[PATCH] D125860: [clang] Only use major version in resource dir

2022-11-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473951. tbaeder added a comment. Add a release note CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125860/new/ https://reviews.llvm.org/D125860 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Version.inc.in clang/lib/Driver/Driver

[PATCH] D125860: [clang] Only use major version in resource dir

2022-11-08 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. I'm worried that this is gonna break build bots. Has anyone seen the ThreadSanitizer timeout reported by the precommit-ci before? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125860/new/ https://reviews.llvm.org/D125860 ___

[PATCH] D137386: [clang][Interp] Reject invalid declarations and expressions

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

[PATCH] D137386: [clang][Interp] Reject invalid declarations and expressions

2022-11-09 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/functions.cpp:88-97 +constexpr int invalid() { + // Invalid expression in visit(). + while(huh) {} +} + +constexpr void invalid2() { + int i = 0; aaron.b

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474177. tbaeder marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137488/new/ https://reviews.llvm.org/D137488 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/literals.cpp Index: clang/test/AS

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1133-1134 + } else if (const auto *SL = dyn_cast(Initializer)) { +const ArrayType *AT = SL->getType()->getAsArrayTypeUnsafe(); +const auto *CAT = cast(AT); +size_t NumElems = CAT->get

[PATCH] D137071: [clang][Interp] Implement missing compound assign operators

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

[PATCH] D137232: [clang][Interp] Support inc/dec operators on pointers

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

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Opcodes.td:502 + let Types = [AluTypeClass]; + let Args = [ArgFltSemantics]; + let HasGroup = 1; jcranmer-intel wrote: > tbaeder wrote: > > sepavloff wrote: > > > tbaeder wrote: > > > > jcranmer-i

[PATCH] D137071: [clang][Interp] Implement missing compound assign operators

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D137071#3915565 , @aaron.ballman wrote: > Precommit CI looks to have potentially found something interesting here. There might be one of my local patches missing, but it looks like it's somehow not applying this patch, which

[PATCH] D137563: [clang][Interp] Check declarations for constexpr-ness in Load() instructions

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. This is wrong if the (constant) initializer is for a legitimate non-constexpr variable declaration. We do a load in `visitDecl()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137563/new/ https://reviews.llvm.org/D137563

[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a subscriber: inglorion. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The pointers

[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:188-192 +// == in C +if (const auto *BOP = dyn_cast(SubExpr); +BOP && BOP->isEqualityOp()) + return this->visit(SubExpr); +[[fallthrough]]; This is a tiny

[PATCH] D137071: [clang][Interp] Implement missing compound assign operators

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

[PATCH] D137071: [clang][Interp] Implement missing compound assign operators

2022-11-09 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/literals.cpp:591 + + static_assert(IntDiv(INT_MIN, -1) == 0, ""); + aaron.ballman wrote: > This one should fail for the same reason as `%` Works when repla

[PATCH] D137232: [clang][Interp] Support inc/dec operators on pointers

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Opcodes.td:421-425 +// [Pointer] -> [] +def IncPtr : Opcode { + let HasGroup = 0; +} +// [Pointer] -> [] aaron.ballman wrote: > Don't both of these result in a `Pointer`? And should they have a `Typ

[PATCH] D137719: [clang] Missed rounding mode use in constant evaluation

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2653 + APFloat::opStatus St = Result.convertFromAPInt(Value, Value.isSigned(), RM); + return checkFloatingPointResult(Info, E, St); } `SrcType` was already unused before, but not so is `

[PATCH] D137719: [clang] Missed rounding mode use in constant evaluation

2022-11-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2653 + APFloat::opStatus St = Result.convertFromAPInt(Value, Value.isSigned(), RM); + return checkFloatingPointResult(Info, E, St); } tbaeder wrote: > `SrcType` was already unused before

[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts

2022-11-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474459. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137706/new/ https://reviews.llvm.org/D137706 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Opcodes.td clang/lib/AST/Interp/Pointer.cpp

[PATCH] D125860: [clang] Only use major version in resource dir

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 rGe1b88c8a09be: [clang] Only use major version in resource dir (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474551. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 Files: clang/lib/AST/CMakeLists.txt clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGe

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-11-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping. This review has been open for a month now and a lot of following functionality depends on it, so if you need to decide which one of the patches to review, choose this one :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135750/new/ https://reviews.llvm.o

[PATCH] D137545: [clang][Interp] DerivedToBase casts

2022-11-10 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7863646fd206: [clang][Interp] DerivedToBase casts (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137545/new/ https://reviews.llvm.org/

[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] D136831: [clang][Interp] Protect Record creation against infinite recusion

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 rG99d3ead44cfb: [clang][Interp] Protect Record creation against infinite recursion (authored by tbaeder). Changed prior to commit: https://reviews.l

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474676. tbaeder added a comment. Added the int-to-float conversion tests from https://reviews.llvm.org/D137719 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 Files: clang/lib/AST/CMakeLists.txt clang/

[PATCH] D137826: [clang] Allow comparing pointers to string literals

2022-11-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, jwakely. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes https://github.com/llvm/llvm-project/issues/58754 Repository:

[PATCH] D136936: [clang][Interp] Handle undefined functions better

2022-11-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeEmitter.cpp:24-31 + bool HasBody = true; + + // Function is not defined at all or not yet. We will + // create a Function instance but not compile the body. That +

[PATCH] D137232: [clang][Interp] Support inc/dec operators on pointers

2022-11-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474724. tbaeder marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137232/new/ https://reviews.llvm.org/D137232 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Opco

[PATCH] D137232: [clang][Interp] Support inc/dec operators on pointers

2022-11-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:216 - static_assert(getNextElem(E, 1) == 3); -#endif + static_assert(getNextElem(E, 1) == 3, ""); + aaron.ballman wrote: > aaron.ballman wrote: > > I'd like test cases where the point

[PATCH] D136815: [clang][Interp] Unify visiting variable declarations

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

[PATCH] D136457: [clang][Interp] Fix discarding non-primitive function call return values

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

[PATCH] D136694: [clang][Interp] Check that constructor calls initialize all record fields

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

[PATCH] D136751: [clang][Interp] This pointers are writable in constructors

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

[PATCH] D137070: [clang][Interp] Support destructors

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

[PATCH] D137235: [clang][Interp] Fix ImplicitValueInitExprs for pointer types

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

[PATCH] D137386: [clang][Interp] Reject invalid declarations and expressions

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

[PATCH] D137386: [clang][Interp] Reject invalid declarations and expressions

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

[PATCH] D137071: [clang][Interp] Implement missing compound assign operators

2022-11-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added a comment. Can't push this without https://reviews.llvm.org/D135750, since the variables in the test functions are used without being initialized. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137071/new/ https://reviews.llvm.org/

[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts

2022-11-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474929. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137706/new/ https://reviews.llvm.org/D137706 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/builtins.cpp clang/test/SemaCXX/constant-expression-cxx11.cpp clang/test/SemaCXX/const

[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts

2022-11-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474930. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137706/new/ https://reviews.llvm.org/D137706 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Opcodes.td clang/lib/AST/Interp/Pointer.cpp

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2022-11-15 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 475697. tbaeder marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137488/new/ https://reviews.llvm.org/D137488 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/literals.cpp Index: clang/test/AS

[PATCH] D138115: [clang] Short-circuit evaluation in ::EvaluateAsConstantExpr

2022-11-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This adds another case to `FastEvaluateAsRValue()` for boolean expressio

[PATCH] D137826: [clang] Allow comparing pointers to string literals

2022-11-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:12951-12954 + // ObjC's @encode() + if (isa(E->getLHS()->IgnoreParenImpCasts()) || + isa(E->getRHS()->IgnoreParenImpCasts())) return Error(E); tahonermann wrote:

[PATCH] D138115: [clang] Short-circuit evaluation in ::EvaluateAsConstantExpr

2022-11-17 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGec782951d7bd: [clang] Short-circuit evaluation in ::EvaluateAsConstantExpr (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138115/new/

[PATCH] D138194: [clang][Parser][NFC] Simplify ParseParenExprOrCondition

2022-11-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added a reviewer: clang. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138194 Files: clang/inc

[PATCH] D138207: [clang][Parse][NFC] Remove unused CommaLocs parameters

2022-11-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added a reviewer: clang. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The vectors holding the comma locs are unused (except for an assertion in two places). R

[PATCH] D138194: [clang][Parser][NFC] Simplify ParseParenExprOrCondition

2022-11-17 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 rG9f6147900739: [clang][Parser][NFC] Simplify ParseParenExprOrCondition (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D13

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-11-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked 14 inline comments as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:749-751 + const Descriptor::MetadataSize MDSize{sizeof(InlineDescriptor)}; + Descriptor *D = + P.createDescriptor(Src, Ty, MDSize, IsConst, Src.is

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-11-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 476334. tbaeder marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135750/new/ https://reviews.llvm.org/D135750 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/lib/AST/

[PATCH] D138207: [clang][Parse][NFC] Remove unused CommaLocs parameters

2022-11-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder closed this revision. tbaeder added a comment. Dang, looks like I forgot to mention the review in https://github.com/llvm/llvm-project/commit/e78a43dacafb8b97fc377a52f8f206e37d94d5d6. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138207/new

[PATCH] D140803: [clang][Interp] Implement C++ Range-for loops

2023-01-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:418-419 + this->emitLabel(IncLabel); + if (Inc && !this->discard(Inc)) +return false; + if (!this->jump(CondLabel)) aaron.ballman

[PATCH] D140803: [clang][Interp] Implement C++ Range-for loops

2023-01-24 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/loops.cpp:278 + +namespace RangeForLoop { + constexpr int localArray() { aaron.ballman wrote: > You should also add failure tests where the range-based for

[PATCH] D141194: [clang][Interp] Implement bitcasts

2023-01-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Note that this "implementation" is based on my knowledge about what bitcasts are, so no idea. Is that documented anywhere or should I check `ExprConstant.cpp`, //or// is this implementation fine for the time being (IIRC this was needed to make a stdlib header work)? R

[PATCH] D138802: [clang][Interp] Implement DecompositionDecls

2023-01-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1417-1418 + assert(!BD->getHoldingVar()); // FIXME + if (!this->allocateVariable(BD, BD->getBinding())) +return false; +} aaron.ballman wrote: > Is this corr

[PATCH] D140803: [clang][Interp] Implement C++ Range-for loops

2023-01-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 491674. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140803/new/ https://reviews.llvm.org/D140803 Files: clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/lib/AST/Interp/ByteCodeStmtGen.h clang/test/AST/Interp/loops.cpp Index: clang/test/AST/Int

[PATCH] D142448: [clang][Interp] Handle TypeTraitExprs

2023-01-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, tahonermann, erichkeane, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Only light testing here, since the value we're emit

[PATCH] D137070: [clang][Interp] Support destructors

2023-01-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked 3 inline comments as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1915-1916 + +if (const CXXDestructorDecl *Dtor = ElemRecord->getDestructor(); +Dtor && !Dtor->isTrivial()) { + for (size_t I = 0, E = Des

[PATCH] D137070: [clang][Interp] Support destructors

2023-01-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 491709. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137070/new/ https://reviews.llvm.org/D137070 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/ByteCodeStmtGen.cpp clang/test/AST/

[PATCH] D142328: [clang][Interp] Fix compound assign operator types

2023-01-24 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. I know it hasn't been a week yet, but can someone take a look at this? It would unblock pushing more of the approved patches. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142328/new/ https://reviews.llvm.org/D142328 ___

[PATCH] D142328: [clang][Interp] Fix compound assign operator types

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

[PATCH] D142328: [clang][Interp] Fix compound assign operator types

2023-01-25 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 rGde3a3cb987f1: [clang][Interp] Fix compound assign operator types (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D137082: [clang][Interp] Fix dereferencing arrays with no offset applied

2023-01-25 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 rGad2fb01cb68d: [clang][Interp] Fix dereferencing arrays with no offset applied (authored by tbaeder). Changed prior to commit: https://reviews.llvm

[PATCH] D137232: [clang][Interp] Support inc/dec operators on pointers

2023-01-25 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 rG7348bb36c557: [clang][Interp] Support inc/dec operators for pointers (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D137

[PATCH] D137235: [clang][Interp] Fix ImplicitValueInitExprs for pointer types

2023-01-25 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2725e2c0323f: [clang][Interp] Fix ImplicitValueInitExprs for pointer types (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D137235?vs=472545&id=492049#toc Repository: rG LLVM

[PATCH] D137386: [clang][Interp] Reject invalid declarations and expressions

2023-01-25 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 rGf4a6842c5a4d: [clang][Interp] Reject invalid declarations and expressions (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org

[PATCH] D137415: [clang][Interp] Implement switch statements

2023-01-25 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 rG024e4f16ca79: [clang][Interp] Implement switch statements (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D137415?vs=4788

[PATCH] D137487: [clang][Interp] Start implementing builtin functions

2023-01-25 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. tbaeder marked an inline comment as done. Closed by commit rGa7a4463acbe1: [clang][Interp] Start implementing builtin functions (authored by tbaeder). Repository: rG

[PATCH] D137488: [clang][Interp] Array initialization via string literal

2023-01-25 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 rG0a3243de62c1: [clang][Interp] Array initialization via string literal (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D13

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2023-01-25 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 rG62f43c3eae24: [clang][Interp] Support floating-point values (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D134859?vs=48

[PATCH] D140377: [clang][Interp] Compound assign operators for FP values

2023-01-25 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 rGaf3a171dcffd: [clang][Interp] Compound assign operators for FP values (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D14

[PATCH] D140724: [clang][Interp] Add back Run() call

2023-01-25 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 rGcb703434cbdc: [clang][Interp] Add back Run() call (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D142550: Fix sizeof of boolean vector

2023-01-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/SemaCXX/vector-bool.cpp:95 +void Sizeof() { + using FourBools = bool __attribute__((ext_vector_type(8))); + static_assert(sizeof(FourBools) == 1); Should be 4 instead of 8, shouldn't it? Repository: rG L

[PATCH] D140809: [clang][Interp] Implement logical and/or operators

2023-01-25 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 rGd2ea8ae5d43e: [clang][Interp] Implement logical and/or operators (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D140809?

[PATCH] D140845: [clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)

2023-01-25 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 rG00e967f6c2d6: [clang][Interp] Fix left-/right-shifting more than sizeof(unsigned) (authored by tbaeder). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts

2023-01-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Note that according to https://clang.llvm.org/docs/ConstantInterpreter.html#pointers, such pointers had their own pointer type (`TargetPointer`), so I'm not sure if the approach here is the right one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137706/new/

[PATCH] D141472: [clang][Interp] Add function pointers

2023-01-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:138-139 case CK_IntegralToPointer: { if (isa(SubExpr)) return this->visit(SubExpr); aaron.ballman wrote: > Can we still

[PATCH] D141472: [clang][Interp] Add function pointers

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

[PATCH] D142617: [clang][Interp] Check This pointer without creating InterpFrame

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. The InterpFrame was only created so early so we c

[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

[PATCH] D141193: [clang][Interp] Implement __builtin_assume

2023-01-26 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 rG760136ff13ba: [clang][Interp] Implement __builtin_assume (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D142694: [clang][Interp] Only generate disassembly in debug builds

2023-01-27 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. With the current set of opcodes, this saves 3460

[PATCH] D141472: [clang][Interp] Add function pointers

2023-01-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D141472#4091662 , @aaron.ballman wrote: > Design question -- do you anticipate this class handling *all* function > pointers, including pointer to member functions that might be virtual: > https://godbolt.org/z/hT8fMY37n I

[PATCH] D141858: [clang][Interp] Fix Pointer::toAPValue() for expressions

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

[PATCH] D141591: [clang][Interp] Properly identify not-yet-defined functions

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

[PATCH] D140874: [clang][Interp] Support pointer types in compound assignment operations

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

[PATCH] D141858: [clang][Interp] Fix Pointer::toAPValue() for expressions

2023-01-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. It's a bit involved since without working `MaterializeTemporaryExpr`s, this code is a no-op, but without this code, the MTEs don't properly work, usually. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141858/new/ https://reviews.llvm.org/D141858 __

[PATCH] D142448: [clang][Interp] Handle TypeTraitExprs

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

[PATCH] D137070: [clang][Interp] Support destructors

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

[PATCH] D138802: [clang][Interp] Implement DecompositionDecls

2023-02-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1417-1418 + assert(!BD->getHoldingVar()); // FIXME + if (!this->allocateVariable(BD, BD->getBinding())) +return false; +} aaron.ballman wrote: > tbaeder wrot

[PATCH] D138802: [clang][Interp] Implement DecompositionDecls

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

[PATCH] D142277: [clang][Interp] Clear metadata when destroying locals

2023-02-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/EvalEmitter.cpp:260-261 +// local variable is used after being destroyed. +InlineDescriptor &ID = *reinterpret_cast(B->rawData()); +std::memset(&ID, 0, sizeof(InlineDescriptor)); } aar

[PATCH] D142448: [clang][Interp] Handle TypeTraitExprs

2023-02-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 494504. tbaeder marked an inline comment as done. tbaeder added a comment. Nope, no surprises. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142448/new/ https://reviews.llvm.org/D142448 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/

[PATCH] D138802: [clang][Interp] Implement DecompositionDecls

2023-02-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 494517. tbaeder marked 7 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138802/new/ https://reviews.llvm.org/D138802 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/In

[PATCH] D137070: [clang][Interp] Support destructors

2023-02-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1915-1916 + +if (const CXXDestructorDecl *Dtor = ElemRecord->getDestructor(); +Dtor && !Dtor->isTrivial()) { + for (size_t I = 0, E = Des

[PATCH] D141591: [clang][Interp] Properly identify not-yet-defined functions

2023-02-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/functions.cpp:158-174 +struct F { + constexpr bool ok() const { +return okRecurse(); + } + constexpr bool okRecurse() const { +return true; + } aaron.ballman wrote: > Should we have some

[PATCH] D141858: [clang][Interp] Fix Pointer::toAPValue() for expressions

2023-02-03 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 rGf63138d44429: [clang][Interp] Fix Pointer::toAPValue() for expressions (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE L

<    3   4   5   6   7   8   9   10   11   12   >