[clang] Null field access (PR #69223)

2023-10-16 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69223 Looks like this should work as long as we don't dereference the value. Note: This is a change from my local branch where I introduce integral pointers. One

[clang] [clang][Interp] Handle delegating constructors (PR #67823)

2023-10-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/67823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Check pointer inc/dec ops for null (PR #69168)

2023-10-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69168 None >From b20da36444adfbdbddd6d0dddf06535815ffe0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 3 Sep 2023 07:03:04 +0200 Subject: [PATCH] [clang][Interp] Check pointer inc/dec ops

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67814 >From ee34e6baf120ebde84bb0adbc2f9c73a66a6918a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 29 Sep 2023 16:43:59 +0200 Subject: [PATCH] [clang][Interp] Handle variadic functions

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-16 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle delegating constructors (PR #67823)

2023-10-16 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Interp] Correctly emit destructors for multi-dimensional arrays (PR #69140)

2023-10-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69140 We were not taking those into account correctly when emitting destructors. Fix that and add tests for it. Fixes #69115 >From 9a3a88061790193575dbf76c3ddb2c0566fd6543 Mon Sep 17 00:00:00 2001 From:

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?=

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-15 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?=

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-14 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Interp] Implement compound assign operators on bitfields (PR #67306)

2023-10-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/67306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

2023-10-14 Thread Timm Baeder via cfe-commits
@@ -100,12 +100,13 @@ template class IntegralAP final { } static IntegralAP from(const Boolean ) { assert(false); -return IntegralAP::zero(); +return IntegralAP::zero(1); tbaederr wrote: I don't have such comments because I opted for

[clang] [clang] Additional FP classification functions (PR #69041)

2023-10-14 Thread Timm Baeder via cfe-commits
@@ -494,6 +494,9 @@ BUILTIN(__builtin_isinf, "i.", "FnctE") BUILTIN(__builtin_isinf_sign, "i.", "FnctE") BUILTIN(__builtin_isnan, "i.", "FnctE") BUILTIN(__builtin_isnormal, "i.", "FnctE") +BUILTIN(__builtin_issubnormal,"i.", "FnctE") +BUILTIN(__builtin_iszero,

[clang] [clang][Interp] Add explicit dummy descriptors (PR #68888)

2023-10-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/6 >From 538bc1a046c8bf3837935ff3403b304a636ed557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 12 Oct 2023 15:27:38 +0200 Subject:

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/68679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread Timm Baeder via cfe-commits
@@ -1847,19 +1851,46 @@ bool Lexer::LexUnicodeIdentifierStart(Token , uint32_t C, return true; } +static const char *fastParseASCIIIdentifier(const char *CurPtr, const char* BufferEnd) { +#ifdef __SSE4_2__ + static constexpr char AsciiIdentifierRange[16] = { + '_',

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To:

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-10-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/68288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68679 >From 8aae860a7079d50e8b3a657335e115c2cca9fcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 10 Oct 2023 08:52:43 +0200 Subject: [PATCH] [clang][Interp] Support AddOffset with 128bit

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2023-10-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67095 >From a7c2b5a2834ef6dc345257e8d67caae909abbe20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 22 Sep 2023

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-13 Thread Timm Baeder via cfe-commits
@@ -478,6 +480,43 @@ template class SourceLocScope final { bool Enabled = false; }; +template class StoredOpaqueValueScope final { +public: + StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {} + + bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) { +

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-13 Thread Timm Baeder via cfe-commits
@@ -478,6 +480,43 @@ template class SourceLocScope final { bool Enabled = false; }; +template class StoredOpaqueValueScope final { +public: + StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {} + + bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) { +

[clang] [clang][Interp] Only emit function_param_value_unknown in C++11 (PR #67990)

2023-10-13 Thread Timm Baeder via cfe-commits
tbaederr wrote: https://reviews.llvm.org/D156565 hasn't been merged as far as I can tell and it's the only test case I have for this. :( https://github.com/llvm/llvm-project/pull/67990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

2023-10-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68081 >From a7f0b32783bd8e9ce4d74d98e5a45351d3b38d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 11:05:27 +0200 Subject: [PATCH] [clang][Interp] IntegralAP zero-init ---

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

2023-10-13 Thread Timm Baeder via cfe-commits
@@ -1642,9 +1642,9 @@ bool ByteCodeExprGen::visitZeroInitializer(QualType QT, case PT_Uint64: return this->emitZeroUint64(E); case PT_IntAP: +return this->emitZeroIntAP(128, E); // FIXME: Ctx.getBitWidth() case PT_IntAPS: -assert(false); -return false;

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

2023-10-13 Thread Timm Baeder via cfe-commits
@@ -100,12 +100,13 @@ template class IntegralAP final { } static IntegralAP from(const Boolean ) { assert(false); -return IntegralAP::zero(); +return IntegralAP::zero(1); } - static IntegralAP zero() { -assert(false); -return IntegralAP(0); +

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

2023-10-13 Thread Timm Baeder via cfe-commits
@@ -100,12 +100,13 @@ template class IntegralAP final { } static IntegralAP from(const Boolean ) { assert(false); -return IntegralAP::zero(); +return IntegralAP::zero(1); tbaederr wrote: This is unimplemented right now, I just added the

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68679 >From 9598f33926ede7a35a431bebc3ed6f8ce20b03ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 10 Oct 2023 08:52:43 +0200 Subject: [PATCH] [clang][Interp] Support AddOffset with 128bit

[clang] [clang][Interp] Fix crash during `InterpStack` printing (PR #68246)

2023-10-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/68246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Fix crash during `InterpStack` printing (PR #68246)

2023-10-12 Thread Timm Baeder via cfe-commits
tbaederr wrote: > Although the previous > implementation didn't have unittests either, so I'm not sure if we actually > care that much or not. We don't, I think I've used this function once. But I don't want to delete it either because it could come in handy in the future. LGTM

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-12 Thread Timm Baeder via cfe-commits
@@ -827,6 +829,9 @@ bool ByteCodeExprGen::VisitArrayInitLoopExpr( template bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) { + if (OpaqueExprs.contains(E)) +return this->emitGetLocal(*classify(E), OpaqueExprs[E], E); tbaederr wrote:

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-12 Thread Timm Baeder via cfe-commits
@@ -366,8 +363,7 @@ namespace ArrayInitLoop { auto [a, b, c] = f(n).arr; return a + b + c; } - static_assert(g() == 6); // expected-error {{failed}} \ - // expected-note {{15 == 6}} + static_assert(g() == 6); tbaederr

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-12 Thread Timm Baeder via cfe-commits
@@ -478,6 +480,43 @@ template class SourceLocScope final { bool Enabled = false; }; +template class StoredOpaqueValueScope final { +public: + StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {} + + bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) { +

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-12 Thread Timm Baeder via cfe-commits
@@ -478,6 +480,43 @@ template class SourceLocScope final { bool Enabled = false; }; +template class StoredOpaqueValueScope final { +public: + StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {} + + bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) { +

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/68039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr requested changes to this pull request. https://github.com/llvm/llvm-project/pull/68039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add explicit dummy descriptors (PR #68888)

2023-10-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/6 Instead of (ab)using incomplete array types for this, add a 'Dummy' bit to Descriptor. We need to be able to differentiate between the two when adding an offset. >From 03184302329bfd3e02cd97ccfa26613379d8767f

[clang] [clang][Interp] Handle unknown-size arrays better (PR #68868)

2023-10-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68868 We unfortunately actually need to do some checks for array-to-pointer decays it seems. >From 4947d93ac3487941c83728725c219bb23f884cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 12

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68679 >From 5fff64e74c885472abcd2a320d6db9005cc7c4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 10 Oct 2023 08:52:43 +0200 Subject: [PATCH] [clang][Interp] Support AddOffset with 128bit

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/68679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Only emit function_param_value_unknown in C++11 (PR #67990)

2023-10-11 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

2023-10-11 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/68081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-11 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/68069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-10 Thread Timm Baeder via cfe-commits
@@ -1437,7 +1437,7 @@ bool OffsetHelper(InterpState , CodePtr OpPC, const T , return false; }; - unsigned MaxOffset = MaxIndex - Ptr.getIndex(); + T MaxOffset = T::from(MaxIndex - Ptr.getIndex(), Offset.bitWidth()); tbaederr wrote: Dunno, We never

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68069 >From ae2201c2bb82ae26030800c62b3a0f93e2ec49a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject:

[clang] [clang][Interp] Implement compound assign operators on bitfields (PR #67306)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67306 >From d275b2de769bbae45c87c9ae7e04d744b4849c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 25 Sep 2023 11:39:02 +0200 Subject: [PATCH] [clang][Interp] Implement compound assign

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-10 Thread Timm Baeder via cfe-commits
tbaederr wrote: I've merged https://reviews.llvm.org/D155548, so closing this. https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68069 >From ae2201c2bb82ae26030800c62b3a0f93e2ec49a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject: [PATCH] [clang][Interp] Add basic support for _BitInt

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68069 >From c93895b7e1b0727327178d73adc93cb988ad3966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject: [PATCH] [clang][Interp] Add basic support for _BitInt

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/67147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -8141,6 +8141,16 @@ static void handleRequiresCapabilityAttr(Sema , Decl *D, if (!AL.checkAtLeastNumArgs(S, 1)) return; + // We allow this on function declaration as well as + // variable declarations of function

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/68679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68679 We do a similar things a few lines above for `Index`: ``` // Get a version of the index comparable to the type. T Index = T::from(Ptr.getIndex(), Offset.bitWidth()); ``` >From

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67147 >From 367cf9517a425d410c120ce7bd201988e3075ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 22 Sep 2023 16:27:11 +0200 Subject: [PATCH] [clang][Interp] Handle CXXScalarValueInitExprs

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/67229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

2023-10-10 Thread Timm Baeder via cfe-commits
tbaederr wrote: Yeah sorry for the unnecessary ping :) I'll push as soon as the CI is done. https://github.com/llvm/llvm-project/pull/67229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67229 >From 32d5ecddc5b6aff0924b48a0b35128be7b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 23 Sep 2023 11:41:52 +0200 Subject: [PATCH] [clang][Interp] Fix returning nullptr from

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67147 >From 54840541b94b5ccc02c1c563678991ea230acbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 22 Sep 2023 16:27:11 +0200 Subject: [PATCH] [clang][Interp] Handle CXXScalarValueInitExprs

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > > This was much easier than expected actually. > > Making it a `DeclOrType` attribute is indeed a nice idea, this would allow > existing attributes to stay where they are. Is it still inheritable, i.e. > does it also apply

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle variadic functions (PR #67814)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle delegating constructors (PR #67823)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Emit dummy values for unknown C variables (PR #66749)

2023-10-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/66749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Emit dummy values for unknown C variables (PR #66749)

2023-10-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66749 >From 1d36bdbd1e876adb5c39cf8e06c8387d5de1ab71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 19 Sep 2023 08:47:01 +0200 Subject: [PATCH] [clang][Interp] Emit dummy values for unknown C

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-07 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-07 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To:

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-07 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-07 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: Preliminary results show a

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-06 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-06 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: The latest commit keeps a

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-06 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr converted_to_draft

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-06 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: ^ Removing integer and boolean expressions seems to have some negative impact though. https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: http://llvm-compile-time-tracker.com/index.php?config=NewPM-O3=instructions%3Au=tbaederr https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: > > Well, this is not going to make a noticeable difference in runtime. > > https://reviews.llvm.org/D155548 didn't land because there are no > > measurements to make where this makes a measurable difference. > > Those changes didn't land because no measurements were

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: Well, this is not going to make a noticeable difference in runtime. https://reviews.llvm.org/D155548 didn't land because there are no measurements to make where this makes a measurable difference. As for my earlier comment, it would also make sense to rename that function to

[clang] [clang][Sema] Only check RVV types if we have them (PR #67669)

2023-10-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/67669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Only check RVV types if we have them (PR #67669)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Add bitfield source range to zero width diags (PR #68312)

2023-10-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/68312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-05 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > Also, redirecting output to a file doesn't always

[clang] [clang][NFC] Refactor Builtins.def to be a tablegen file (PR #68324)

2023-10-05 Thread Timm Baeder via cfe-commits
@@ -172,6 +173,8 @@ cl::opt Action( "Generate clang attribute text node dumper"), clEnumValN(GenClangAttrNodeTraverse, "gen-clang-attr-node-traverse", "Generate clang attribute traverser"), +clEnumValN(GenClangBuiltins,

[clang] [clang][Diagnostics] Add bitfield source range to zero width diags (PR #68312)

2023-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68312 Before: ``` array.cpp:157:8: error: named bit-field 'a' has zero width 157 | char a : 12 - 12; |^ 1 error generated. ``` After: ``` array.cpp:157:8: error: named bit-field 'a' has zero width

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-10-05 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68288 >From e208c2fc7932d80d441d90bfa0fd949b8910a4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 11 Jul 2023 13:45:04 +0200 Subject:

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2023-10-05 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68288 >From https://reviews.llvm.org/D154951 - which is never gonna make it out of >Phabricator anyway. The tests are failing because https://reviews.llvm.org/D154581 is not pushed. Aaron's review mentioned that

[clang] [Sema] Add check for bitfield assignments to larger integral types (PR #68276)

2023-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/68276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/67778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67778 >From 55a0f4abbb9ad9270aa18e2eec08b4a0bfb4dae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 29 Sep 2023 11:23:55 +0200 Subject: [PATCH] [clang][ExprConst] Don't try to evaluate

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-04 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Emit dummy values for unknown C variables (PR #66749)

2023-10-04 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/66749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-10-03 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67778 >From 1b6fcc49f5ef9b99b4b2f7019de6d8d24a03f232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject:

<    4   5   6   7   8   9   10   11   12   >