[PATCH] D152132: [clang][Inter] Fix lifetime diagnostics for dead records

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

[PATCH] D153653: [clang][Interp] Make CXXTemporaryObjectExprs leave a value behind

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

[PATCH] D153693: [clang][Interp] Handle InitListExprs of composite type

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

[PATCH] D153689: [clang][Interp] Handle CXXConstructExprs

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

[PATCH] D154189: [clang][Interp] Implement zero-init of record types

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

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

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

[PATCH] D154951: [clang][Interp] __builtin_bit_cast, Take 2

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

[PATCH] D155270: [clang][Interp] Basic support for bit fields

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

[PATCH] D155548: [clang][ExprConst] Short-circuit ConstantExpr evaluation

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

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

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

[PATCH] D154951: [clang][Interp] __builtin_bit_cast, Take 2

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Boolean.h:113 + static Boolean bitcastFromMemory(const std::byte *Buff) { +bool Val = static_cast(*Buff); +return Boolean(Val); MitalAshok wrote: > Does this handle padding bits correctly? E

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Note that this patch also supercedes: 1. https://reviews.llvm.org/D153616 2. https://reviews.llvm.org/D153653 3. https://reviews.llvm.org/D147591 since it handles those cases more generally. Comment at: clang/lib/AST/Interp/Context.cpp:131 if (T->i

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-07-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 rG8cb6e476ccaa: [clang][Interp] Handle PtrMemOps (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D148690: [clang][Interp] Handle __extension__ unary operators

2023-07-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 rG78e774e0c827: [clang][Interp] Handle __extension__ unary operators (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D14869

[PATCH] D150040: [clang][Interp] Call invalid destructors

2023-07-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 rG10020791b18f: [clang][Interp] Call invalid destructors (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D150040?vs=520092&

[PATCH] D147591: [clang][Interp] Handle CXXTemporaryObjectExprs

2023-07-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 rGe45d1997686c: [clang][Interp] Handle CXXTemporaryObjectExprs (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D147591?vs=5

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; Why is there a `ConsumeToken()` call at all here? The token is already being consumed in line 729. Repository: r

[PATCH] D148925: [clang][Interp] Fix discarding void-typed comma expressions

2023-07-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 rGaed9646d8e29: [clang][Interp] Fix discarding void-typed comma expressions (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org

[PATCH] D148982: [clang][Interp] Fix ignoring conditional operators

2023-07-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 rG2606545b0204: [clang][Interp] Fix ignoring conditional operators (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D155545: [clang][Interp] Pass CallExpr to builtin functions

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

[PATCH] D150111: [clang][Interp] Implement lambda static invokers

2023-07-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 rG6d2e141e5c0d: [clang][Interp] Handle lambda static invokers (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D150111?vs=52

[PATCH] D150358: [clang][Interp] Remove args from called functions in more cases

2023-07-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 rG8a4bbeb9168c: [clang][Interp] Remove args from called functions in more cases (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D150364: [clang][Interp] Add 'Invalid' opcode and use it for throw/asm stmts

2023-07-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 rG7d876c62a306: [clang][Interp] Add 'Invalid' opcode and use it for throw stmts (authored by tbaeder). Changed prior to commit: https://reviews.llvm

[PATCH] D150566: [clang] Provide source range to 'invalid subexpr in const expr' diags

2023-07-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 rG7a3ad8ed77ee: [clang] Provide source range to 'invalid subexpr in const expr' diags (authored by tbaeder). Repository: rG LLVM Github Monorepo CH

[PATCH] D154795: [clang][Interp] Check pointers for live-ness when returning them

2023-07-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 rGc7251385c85d: [clang][Interp] Check pointers for live-ness when returning them (authored by tbaeder). Changed prior to commit: https://reviews.llv

[PATCH] D153276: [clang][Interp] Reject reinterpret_cast expressions

2023-07-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 rG8c0246c7f517: [clang][Interp] Reject reinterpret_casts (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D153276?vs=533238&

[PATCH] D153276: [clang][Interp] Reject reinterpret_cast expressions

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Yeah sorry about that, but should already be fixed by https://github.com/llvm/llvm-project/commit/47446939e0e60cf52ffdd3fa671949ff3183a4c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153276/new/ https://reviews.llvm.org/D

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 544258. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155356/new/ https://reviews.llvm.org/D155356 Files: clang/lib/AST/Interp/InterpBuiltin.cpp clang/test/AST/Interp/builtin-functions.cpp Index: clang/test/AST/Interp/builtin-functions.cpp =

[PATCH] D153649: [clang][Interp] Fix return statements with expresssion in void functions

2023-07-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 rG744a968f91f7: [clang][Interp] Fix return statements with expresssion in void functions (authored by tbaeder). Changed prior to commit: https://rev

[PATCH] D155707: [clang][Interp] Handle CXXNoexceptExprs

2023-07-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 rG378fcbf20ff8: [clang][Interp] Handle CXXNoexceptExprs (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D155707?vs=543266&i

[PATCH] D154475: [clang][Interp] Fix ignoring MaterializeTemporaryExprs

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

[PATCH] D150946: [clang][Interp] PointerToIntegral casts

2023-07-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 rGae4849f96706: [clang][Interp] PointerToIntegral casts (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D150946?vs=523698&i

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:240 +return Initializing ? this->visitInitializer(SubExpr) +: this->visit(SubExpr); This pattern shows up a few times, so it might make sense to add

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:53 + constexpr char f[] = {'0', 'x', 'A', 'E', '\0'}; + constexpr double NaN6 = __builtin_nan(f); // ref-error {{must be initialized by a constant expression}} + aaron.ballm

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:53 + constexpr char f[] = {'0', 'x', 'A', 'E', '\0'}; + constexpr double NaN6 = __builtin_nan(f); // ref-error {{must be initialized by a constant expression}} + aaron.ballm

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 544435. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155356/new/ https://reviews.llvm.org/D155356 Files: clang/lib/AST/Interp/InterpBuiltin.cpp clang/test/AST/Interp/builtin-functions.cpp Index: clang/test/AST/Interp/builtin-functions.cpp =

[PATCH] D155165: [clang][Interp] Fully serialize Floatings to bytes

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

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Put all the index expressions on the stack and cast th

[PATCH] D156047: [clang][Interp] Handle CXXParenListInitExprs

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:661 assert(E->getNumInits() == 1); return DiscardResult ? this->discard(E->inits()[0]) : this->visit(E->inits()[0]); cor3ntin wrote: > how coul

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 544691. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155546/new/ https://reviews.llvm.org/D155546 Files: clang/lib/AST/Interp/InterpBuiltin.cpp clang/test/AST/Interp/builtin-functions.cpp Index: clang/test/AST/Interp/builtin-functions.cpp

[PATCH] D156047: [clang][Interp] Handle CXXParenListInitExprs

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

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 544693. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156400/new/ https://reviews.llvm.org/D156400 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Inter

[PATCH] D156047: [clang][Interp] Handle CXXParenListInitExprs

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. > Also, can you try to add the new interpreter to > test/SemaCXX/paren-list-agg-init.cpp ? Hmm no, looks like there's a problem with rvalue references. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156047/new/ https://reviews.llvm.org/D156047

[PATCH] D156453: [clang][Interp] Create only globals when initializing a global variable

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For this code: struct O { int &&j; }; O

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 544823. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156400/new/ https://reviews.llvm.org/D156400 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Inter

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:65-73 + constexpr float f1 = __builtin_fmin(1.0, 2.0f); + static_assert(f1 == 1.0f, ""); + + constexpr float min = __builtin_fmin(__builtin_nan(""), 1); + static_assert(min == 1, ""); + co

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Thanks for the info @jcranmer-intel. I see that the current intepreter doesn't check this for `__builtin_fmin`(GCC does) either, but it does error out for e.g. `__builtin_nan("") + 1` (GCC doesn't). @aaron.ballman I'd like to handle that in a separate patch where I als

[PATCH] D156503: [clang][Interp] Don't assume throw stmts have a subexpr

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. 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

[PATCH] D153616: [clang][Interp] Create a new local variable in visitLambdaExpr()

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder abandoned this revision. tbaeder added a comment. Abandoning this in favor of https://reviews.llvm.org/D156027 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153616/new/ https://reviews.llvm.org/D153616 _

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. As for signaling vs. quiet NaNs, it seems like both GCC and Clang only check for NaNs, and don't care if it's signaling or not. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155546/new/ https://reviews.llvm.org/D155546 _

[PATCH] D156506: [clang][Interp] Check floating results for NaNs

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This does not handle the builtin functions yet, since

[PATCH] D156509: [clang][Interp] Diagnose unknown parameter values

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. 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

[PATCH] D156509: [clang][Interp] Diagnose unknown parameter values

2023-07-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 545028. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156509/new/ https://reviews.llvm.org/D156509 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Interp.cpp clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Opcodes.td

[PATCH] D154262: [clang][Interp] LambdaThisCaptures

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

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

2023-08-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Comment at: clang/test/AST/Interp/literals.cpp:1047 - // expected-warning {{variable length array folded to constant array}} -} Ignore this block, that's just from rebasing. CHANGES SINCE LAST ACT

[PATCH] D156400: [clang][Interp] Implement __builtin_offsetof

2023-08-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1536-1537 + // Cast to Sint64. + if (IndexT != PT_Sint64) { +if (!this->emitCast(IndexT, PT_Sint64, E)) + return false; cor3ntin wrote: > Shouldn't that

[PATCH] D156453: [clang][Interp] Create only globals when initializing a global variable

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

[PATCH] D156794: [clang][Interp] Lazily visit unknown global declarations

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

[PATCH] D157072: [clang][ExprConst] Check float operation input for signaling NaNs

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

[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

2023-08-11 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:2063-2064 bool isInstance() const { return !isStatic(); } + bool isExplicitObjectMemberFunction() const; + bool isImplicitObjectMemberFunction() const; + const ParmVarDecl *getNonObjectParameter(un

[PATCH] D157855: [clang][ExprConstant] Improve error message of compound assignment against uninitialized object

2023-08-14 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Generally LGTM, but I feel like the changes aren't c++2a specific (except for uninitialized variables in constexpr functions). Comment at: clang/lib/AST/ExprConstant.cpp:4447 + Info.FFDiag(E, diag::note_constexpr_access_uninit) + << /*rea

[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

[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] D153689: [clang][Interp] Handle CXXConstructExprs

2023-08-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder abandoned this revision. tbaeder added a comment. Superseeded by https://reviews.llvm.org/D156027. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153689/new/ https://reviews.llvm.org/D153689 ___ c

[PATCH] D157385: [clang][CFG] Cleanup functions

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

[PATCH] D157383: [clang][Diagnostics] Provide source range to integer-overflow warnings

2023-08-16 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder accepted this revision. tbaeder added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/AST/Interp/Interp.h:530-535 if (S.checkingForUndefinedBehavior()) { SmallString<32> Trunc; APResult.trunc(Result.bitWidth()).toString

[PATCH] D156604: [clang][ExprConst] Use call source range for 'in call to' diags

2023-08-16 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG871ee9414112: [clang][ExprConst] Use call source range for 'in call to' diags (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D156604?vs=548520&id=550724#toc Repository: rG L

[PATCH] D152504: [clang][ThreadSafety] Analyze cleanup functions

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder abandoned this revision. tbaeder added a comment. I split out the CFG parts as https://reviews.llvm.org/D152504 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152504/new/ https://reviews.llvm.org/D152504 ___ cfe-commits mailing list cf

[PATCH] D157596: [clang][Interp] Handle mixed floating/integral compound assign operators

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

[PATCH] D144457: [clang][Interp] Handle global composite temporaries

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

[PATCH] D154688: [clang] Show verify prefix in error messages

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb4e0589b2cd9: [clang][Verify] Show prefix in -verify error messages (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154688/new/ https:/

[PATCH] D155545: [clang][Interp] Pass CallExpr to builtin functions

2023-08-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 rG8a25145058d2: [clang][Interp] Pass CallExpr to builtin functions (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D155545?

[PATCH] D155552: [clang][Interp] Support __null

2023-08-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 rGc4becd50ad43: [clang][Interp] Support __null (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D12?vs=541366&id=551042#

[PATCH] D155568: [clang][Interp] Make sure we push integers of the correct size

2023-08-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 rG91af0d0a6698: [clang][Interp] Make sure we push integers of the correct size (authored by tbaeder). Changed prior to commit: https://reviews.llvm.

[PATCH] D157879: [clang] Report missing designated initializers in C++

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Tangentially related: Now that we have this `InitializedFields` set, would it be easy to add a warning for double-initialization of fields (that would also trigger in C)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15787

[PATCH] D153695: [clang][Interp] Fix passing parameters of composite type

2023-08-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. tbaeder marked 3 inline comments as done. Closed by commit rG89361e2b98a9: [clang][Interp] Fix passing parameters of composite type (authored by tbaeder). Changed prio

[PATCH] D155165: [clang][Interp] Fully serialize Floatings to bytes

2023-08-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 rGcf10061da75e: [clang][Interp] Fully serialize Floating values to bytes (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D1

[PATCH] D156042: [clang][Interp] Implement __builtin_strlen

2023-08-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 rGd425720aed48: [clang][Interp] Implement __builtin_strlen (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D156042?vs=54341

[PATCH] D152132: [clang][Interp] Fix lifetime diagnostics for dead records

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.cpp:241 bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { - assert(Ptr.isLive() && "Pointer is not live"); if (!Ptr.isMutable()) { aaron.ballman wrote: > I understand

[PATCH] D152132: [clang][Interp] Fix lifetime diagnostics for dead records

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 551087. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152132/new/ https://reviews.llvm.org/D152132 Files: clang/lib/AST/Interp/Descriptor.cpp clang/lib/AST/Interp/InterpBlock.h clang/lib/AST/Interp/InterpState.cpp clang/test/AST/Interp/lifeti

[PATCH] D155430: [clang][Interp] Implement __arithmethic_fence for floating types

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping @lzaron Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155430/new/ https://reviews.llvm.org/D155430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Having https://reviews.llvm.org/D144457 and https://reviews.llvm.org/D144457 approved would make rebasing easier :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155627/new/ https://reviews.llvm.org/D155627 ___ cfe-c

[PATCH] D157385: [clang][CFG] Cleanup functions

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 551131. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157385/new/ https://reviews.llvm.org/D157385 Files: clang/include/clang/Analysis/CFG.h clang/lib/Analysis/CFG.cpp clang/lib/Analysis/ThreadSafety.cpp clang/test/Analysis/scopes-cfg-output.

[PATCH] D157596: [clang][Interp] Handle mixed floating/integral compound assign operators

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 551132. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157596/new/ https://reviews.llvm.org/D157596 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/test/AST/Interp/floats.cpp Index: clang/test/AST/In

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 551162. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154581/new/ https://reviews.llvm.org/D154581 Files: clang/lib/AST/Interp/Descriptor.cpp clang/lib/AST/Interp/Descriptor.h clang/lib/AST/Interp/EvalEmitter.cpp clang/lib/AST/Interp/EvalEmit

[PATCH] D157879: [clang] Report missing designated initializers in C++

2023-08-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D157879#4595058 , @Fznamznon wrote: > In D157879#4594790 , @tbaeder wrote: > >> Tangentially related: Now that we have this `InitializedFields` set, would >> it be easy to add a warnin

[PATCH] D155568: [clang][Interp] Make sure we push integers of the correct size

2023-08-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D155568#4596497 , @vitalybuka wrote: > Breaks the bot > https://lab.llvm.org/buildbot/#/builders/74/builds/21336/steps/13/logs/stdio > > Please take a look or revert? > > Note: msan_track_origins step may have useful details.

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-08-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D155627#4596321 , @aaron.ballman wrote: > In D155627#4595089 , @tbaeder wrote: > >> Having https://reviews.llvm.org/D144457 and https://reviews.llvm.org/D144457 >> approved would make

[PATCH] D144457: [clang][Interp] Handle global composite temporaries

2023-08-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:852 + return false; +return this->emitInitGlobalTempComp(TempDecl, E); } aaron.ballman wrote: > Should this still happen even if `TempDecl` is null? It looks like > `

[PATCH] D158218: [CMake] Deprecate DEFAULT_SYSROOT and GCC_INSTALL_PREFIX

2023-08-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added subscribers: tuliom, tbaeder. tbaeder added a comment. CC @tstellar @tuliom since we use `GCC_INSTALL_PREFIX` at least in RHEL/CentOS. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158218/new/ https://reviews.llvm.org/D158218 ___

[PATCH] D157596: [clang][Interp] Handle mixed floating/integral compound assign operators

2023-08-18 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:2659-2664 + if (FromT == PT_Float) { +// Floating to floating. +if (ToT == PT_Float) { + const llvm::fltSemantics *ToSem = &Ctx.getFloatSema

[PATCH] D157596: [clang][Interp] Handle mixed floating/integral compound assign operators

2023-08-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 551434. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157596/new/ https://reviews.llvm.org/D157596 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/PrimType.h clang/test/AST/Interp/fl

[PATCH] D144457: [clang][Interp] Handle global composite temporaries

2023-08-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 551435. tbaeder marked 6 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144457/new/ https://reviews.llvm.org/D144457 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Descriptor.h clang/lib/AST/Interp/

[PATCH] D158093: [Sema] Clean up ActionResult type a little. NFCI

2023-08-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/include/clang/Sema/Ownership.h:180 - /// An opaque type for threading parsed type information through the - /// parser. - using ParsedType = OpaquePtr; - using UnionParsedType = UnionOpaquePtr; +// If we PtrTy has a free bit,

[PATCH] D144457: [clang][Interp] Handle global composite temporaries

2023-08-20 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 rG8a58f0d370b0: [clang][Interp] Handle global composite temporaries (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D152132: [clang][Interp] Fix lifetime diagnostics for dead records

2023-08-20 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 rG39236e9c60e5: [clang][Interp] Fix lifetime diagnostics for dead records (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-08-20 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 rG6dfe55569d88: [clang][Interp] Rework initializers (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D156027?vs=548522&id=55

[PATCH] D158361: [clang][Sema] Fix a copy/paste bug in ~Sema()

2023-08-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added a reviewer: saar.raz. 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/D158361 Files: clang/

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-08-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. All the dependencies have been pushed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155627/new/ https://reviews.llvm.org/D155627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-08-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 551854. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155627/new/ https://reviews.llvm.org/D155627 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Program.cpp clang/test/AST/Interp/b

<    6   7   8   9   10   11   12   13   14   15   >