[clang] [clang][bytecode][NFC] Add a FunctionKind enum (PR #125391)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/125391 >From df8e464c9d99d65f4c171c9de7000febd438d441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Feb 2025 10:45:24 +0100 Subject: [PATCH] [clang][bytecode][NFC] Add a FunctionKind enum

[clang] [clang][bytecode][NFC] Add a FunctionKind enum (PR #125391)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/125391 >From 5fea55e25705386d1415478c1ed2b21909b3e708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Feb 2025 10:45:24 +0100 Subject: [PATCH] [clang][bytecode][NFC] Add a FunctionKind enum

[clang] [clang][bytecode][NFC] Add a FunctionKind enum (PR #125391)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125391 Some function types are special to us, so add an enum and determinte the function kind once when creating the function, instead of looking at the Decl every time we need the information. >From d0925d241a8c7da

[clang] [clang][bytecode][NFC] Only call getSource() when necessary (PR #125419)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125419 None >From 6b3952c8fc1ba420e27ea376e01113c1160b4dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Feb 2025 17:44:19 +0100 Subject: [PATCH] [clang][bytecode][NFC] Only call getSource

[clang] [clang][bytecode] Handle invalid temporary descriptors (PR #125033)

2025-01-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/125033 >From 02698239ff1e88d97e22ccf7a8ae8f89a4eb0262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 30 Jan 2025 06:41:28 +0100 Subject: [PATCH] [clang][bytecode] Handle invalid temporary desc

[clang] [clang][bytecode][NFC] Use RetPC in InterpFrame::getExpr() as well (PR #125200)

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

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Timm Baeder via cfe-commits
tbaederr wrote: Damn, thanks for the revert. https://github.com/llvm/llvm-project/pull/125253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Use Pointer::pointToSameBlock (PR #119552)

2024-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119552 block() requires the pointer to be a block pointer. >From 254b9ed55904777931f666a30110fd356c595243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Dec 2024 13:52:02 +0100 Subject: [P

[clang] [clang][bytecode] Handle __builtin_memcmp (PR #119544)

2024-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/119544 >From b10358067fa9b4e4d05293be168092cd2ea43d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Dec 2024 12:35:29 +0100 Subject: [PATCH] [clang][bytecode] Handle __builtin_memcmp ---

[clang] [clang][bytecode] Handle __builtin_memcmp (PR #119544)

2024-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/119544 >From 14ba7129a6c2dc45dff0bd2054f2da693d9ab77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Dec 2024 12:35:29 +0100 Subject: [PATCH] [clang][bytecode] Handle __builtin_memcmp ---

[clang] [clang][bytecode][NFC] Use Pointer::pointToSameBlock (PR #119552)

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

[clang] [clang][bytecode] Handle __builtin_memcmp (PR #119544)

2024-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/119544 >From d4518ea52cab53861c242e335fbc75af46f4d208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Dec 2024 12:35:29 +0100 Subject: [PATCH] [clang][bytecode] Handle __builtin_memcmp ---

[clang] [clang][bytecode] Check vector element types for eligibility (PR #119385)

2024-12-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119385 Like we do in ExprConstant.cpp. >From 003dd9075216766af2b717e5cfd5f38fba15d6ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 10 Dec 2024 15:12:28 +0100 Subject: [PATCH] [clang][byteco

[clang] [clang][ExprConst] Move vector diagnostics to checkBitCastConstexprEl… (PR #119366)

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

[clang] [clang][bytecode] Check for overlapping memcpy regions (PR #119535)

2024-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119535 None >From 03a5f354277a36d8380477bbd13a35484d701d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Dec 2024 11:08:40 +0100 Subject: [PATCH] [clang][bytecode] Check for overlapping m

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-12-11 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/117732 >From f5d99b37218168f51e460b758f503debf683b086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-12-11 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 edited https://github.com/llvm/llvm-project/pull/117732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From 980c977c9255e6e6ba10bc5eac250a4072ca8aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:54:51 +0100 Subject: [PATCH] Save FieldDecl BitWidth as a ConstantExpr ---

[clang] [clang][bytecode] Check for overlapping memcpy regions (PR #119535)

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

[clang] [clang][bytecode] Allow checking builtin functions... (PR #119328)

2024-12-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119328 ... in checkingPotentialConstantExpression mode. This is what the current interpreter does, yet it doesn't do so for `__builtin_operator_new`. >From 3d465f0e3798e575e5b28d871b87359e35ba3325 Mon Sep 17 00:00:00

[clang] [clang][ExprConst] Move vector diagnostics to checkBitCastConstexprEl… (PR #119366)

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

[clang] [clang][bytecode] Check vector element types for eligibility (PR #119385)

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

[clang] [clang][ExprConst] Move vector diagnostics to checkBitCastConstexprEl… (PR #119366)

2024-12-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/119366 >From 08d3ee1ec762ab9ca63125532556f5db8bbde8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 10 Dec 2024 13:08:39 +0100 Subject: [PATCH] [clang][ExprConst] Move vector diagnostics to

[clang] [clang][bytecode][NFC] Avoid calling ASTContext::getTypeSize() (PR #119392)

2024-12-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119392 In the case of primitive arrays, we can do this once and reuse the value for all elements. >From 58bc17848ee344f2d320ae16d60ec9c00e847999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-12-10 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/117732 >From 83b019598accb1a92e984a1d27892ef27bb3799b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:

[clang] [clang][ExprConst] Move vector diagnostics to checkBitCastConstexprEl… (PR #119366)

2024-12-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119366 …igibilityType This is the function we use to diagnose invalid types, so use it for those checks as well. >From 3fd250e95d6cca9bd822d516d5f6f862215dbe85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4

[clang] [clang][bytecode] Handle __builtin_memcmp (PR #119544)

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

[clang] [clang][bytecode] Handle __builtin_memcmp (PR #119544)

2024-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/119544 >From 060f96d813f31ccf4f3e68e8bbc826a7c263f680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Dec 2024 12:35:29 +0100 Subject: [PATCH] [clang][bytecode] Handle __builtin_memcmp ---

[clang] [clang][bytecode] Handle __builtin_memcmp (PR #119544)

2024-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/119544 >From 3e5ca2bbefddab626003fe10d0b80709f7c96ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Dec 2024 12:35:29 +0100 Subject: [PATCH] [clang][bytecode] Handle __builtin_memcmp ---

[clang] [clang][bytecode] Handle __builtin_bcmp (PR #119678)

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

[clang] [clang][bytecode] Handle __builtin_bcmp (PR #119678)

2024-12-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119678 ... the same as `__builtin_memcmp`. Also fix a bug we still had when we couldn't find a difference in the two inputs after `Size` bytes. >From 3a480676781925badff8b88c3833f083fdc3dcbd Mon Sep 17 00:00:00 2001

[clang] [clang][bytecode] Don't check returned pointers for liveness (PR #120107)

2024-12-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/120107 We're supposed to let them through and then later diagnose reading from them, but returning dead pointers is fine. >From 18b850cd8e6dfce416f7ab40feff3aad9c21a5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=2

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

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

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-16 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?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/118475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang][bytecode] Handle builtin_wmemcmp (PR #120070)

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

[clang] [clang][bytecode] Handle builtin_wmemcmp (PR #120070)

2024-12-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/120070 None >From c00d8f36bffc9819bfa294789e801360ed1f434d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 16 Dec 2024 12:12:03 +0100 Subject: [PATCH] [clang][bytecode] Handle builtin_wmemcmp

[clang] [clang][bytecode] Don't check returned pointers for liveness (PR #120107)

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

[clang] [clang][bytecode] Remove a bitcast nullptr_t special case (PR #120188)

2024-12-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/120188 We still need to check the input pointer, so let this go through BitCastPrim. >From 98b30005491d5082e035bdf966e12ae7f2f205f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 17 Dec 2024

[clang] [clang][bytecode] Remove a bitcast nullptr_t special case (PR #120188)

2024-12-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/120188 >From 6333abaec04c0b3f9bad9239fab73dc08fa77f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 17 Dec 2024 06:21:58 +0100 Subject: [PATCH] [clang][bytecode] Remove a bitcast nullptr_t sp

[clang] [clang][bytecode] Remove a bitcast nullptr_t special case (PR #120188)

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

[clang] [Sema] Diagnose tautological bounds checks (PR #120222)

2024-12-17 Thread Timm Baeder via cfe-commits
@@ -11786,6 +11786,49 @@ static bool checkForArray(const Expr *E) { return D->getType()->isArrayType() && !D->isWeak(); } +/// Detect patterns ptr + size >= ptr and ptr + size < ptr, where ptr is a +/// pointer and size is an unsigned integer. Return whether the result is +/

[clang] [clang][bytecode] Fix memcmp/bcmp failures on big-endian hosts (PR #119851)

2024-12-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119851 See the discussion in https://github.com/llvm/llvm-project/pull/119678#issuecomment-2539680746 and https://github.com/llvm/llvm-project/pull/119544#issuecomment-2539678561 >From 0cf9d2b6bb83de7db94411a5a325ba4c

[clang] [clang][bytecode] Handle __builtin_memcmp (PR #119544)

2024-12-13 Thread Timm Baeder via cfe-commits
tbaederr wrote: Yup, see https://github.com/llvm/llvm-project/pull/119851 https://github.com/llvm/llvm-project/pull/119544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix memcmp/bcmp failures on big-endian hosts (PR #119851)

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

[clang] [clang][bytecode] Fix some shift edge cases (PR #119895)

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

[clang] [clang][bytecode] Fix some shift edge cases (PR #119895)

2024-12-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/119895 Around shifting negative values. >From f72e8e1a6a63b4a6e0f4095f20f551703a037c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 13 Dec 2024 17:02:22 +0100 Subject: [PATCH] [clang][bytec

[clang] [clang][bytecode] Support pointers in __builtin_mem{move, cpy} (PR #120560)

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

[clang] [clang][bytecode] Support pointers in __builtin_mem{move, cpy} (PR #120560)

2024-12-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/120560 Unfortunately, that means we can't use the __builtin_bit_cast implementation for this. >From 1fe4940ad01bae6ab75cdf8bd1ea9812929e716d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 19

[clang] Fix double-quotes in diagnostic when attempting to access a ext_vector of bools (PR #118186)

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

[clang] Fix double-quotes in diagnostic when attempting to access a ext_vector of bools (PR #118186)

2024-12-20 Thread Timm Baeder via cfe-commits
tbaederr wrote: Do you need someone to push this? https://github.com/llvm/llvm-project/pull/118186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-21 Thread Timm Baeder via cfe-commits
@@ -1138,7 +1138,7 @@ void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) { { llvm::TimeTraceScope TimeScope("PerformPendingInstantiations"); -PerformPendingInstantiations(); +PerformPendingInstantiations(false, true); tbaederr wro

[clang] [clang][ExprConst] Reject field access with nullptr base (PR #113885)

2024-11-21 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/113885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Check FromPtr in BitCasttPtr (PR #117142)

2024-11-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/117142 None >From ea7847f4f414e052e0349fe503a2001b930bf22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 21 Nov 2024 12:20:12 +0100 Subject: [PATCH] [clang][bytecode] Check FromPtr in BitCas

[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)

2024-11-21 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/116843 >From 7b6b8c76b1438154f07794be4883625da8e9bd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 2024 14:37:56 +0100 Subject: [PATC

[clang] [clang][bytecode] Initialize bases when bitcasting (PR #117179)

2024-11-21 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 created https://github.com/llvm/llvm-project/pull/117179 None >From 30d56c5522516e1d4b3fdb69c8aae67db8df5d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 202

[clang] [clang][bytecode] Handle bitcasts involving bitfields (PR #116843)

2024-11-21 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -295,62 +218,56 @@ static bool CheckBitcastType(InterpState &S, CodePtr OpPC, QualType T, static bool readPointerToBuffer(const Context &Ctx, const Pointer &FromPtr, BitcastBuffer &Buffer, boo

[clang] [clang][bytecode] Add assert to ensure correct state restoration in CallBI function (PR #115496)

2024-11-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/115496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Clang] Improve Sema diagnostic performance for __builtin_counted_by_ref (PR #116719)

2024-11-21 Thread Timm Baeder via cfe-commits
@@ -14690,6 +14690,14 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) { } } + // The result of __builtin_counted_by_ref cannot be assigned to a variable. + // It allows leaking and modification of bounds safety information. + if (const auto *CE = dyn_cast_if_present

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread Timm Baeder via cfe-commits
@@ -148,6 +151,9 @@ static bool isARMBareMetal(const llvm::Triple &Triple) { return true; } +} // namespace clang tbaederr wrote: ```suggestion } // namespace toolchains ``` https://github.com/llvm/llvm-project/pull/117140 _

[clang] [clang][bytecode][NFC] Avoid a getSource() call (PR #117311)

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

[clang] [clang][bytecode] Initialize bases when bitcasting (PR #117179)

2024-11-21 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/117179 >From 30d56c5522516e1d4b3fdb69c8aae67db8df5d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Nov 2024 14:3

[clang] [clang][bytecode] Check composite bitcasts for indeterminate bits (PR #118988)

2024-12-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/118988 None >From 0086686210e22c7e47444f2e46a262683d9c4594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 6 Dec 2024 15:52:38 +0100 Subject: [PATCH] [clang][bytecode] Check composite bitcasts

[clang] [clang][bytecode] Check composite bitcasts for indeterminate bits (PR #118988)

2024-12-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/118988 >From 08ff053907e66539afd497cf790141c285151958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 6 Dec 2024 15:52:38 +0100 Subject: [PATCH] [clang][bytecode] Check composite bitcasts for i

[clang] [clang][bytecode] Check composite bitcasts for indeterminate bits (PR #118988)

2024-12-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/118988 >From d3e02b47e352447647930cd1ca6142276e39b870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 6 Dec 2024 15:52:38 +0100 Subject: [PATCH] [clang][bytecode] Check composite bitcasts for i

[clang] [clang][bytecode] Not all null pointers are 0 (PR #118601)

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

[clang] [clang][bytecode] Not all null pointers are 0 (PR #118601)

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

[clang] [clang][bytecode] Check primitive bit casts for indeterminate bits (PR #118954)

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

[clang] [clang][bytecode] Check composite bitcasts for indeterminate bits (PR #118988)

2024-12-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/118988 >From c45a6b422ff2ad9f60e7e39d335be2e3d3fe4465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 6 Dec 2024 15:52:38 +0100 Subject: [PATCH] [clang][bytecode] Check composite bitcasts for i

[clang] [clang][bytecode] Check composite bitcasts for indeterminate bits (PR #118988)

2024-12-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/118988 >From 7e723fd3ee3844ad83fa61118dd263a84a6145e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 6 Dec 2024 15:52:38 +0100 Subject: [PATCH] [clang][bytecode] Check composite bitcasts for i

[clang] [clang][bytecode] Check composite bitcasts for indeterminate bits (PR #118988)

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

[clang] [clang][bytecode] Create local scopes for if then/else statements (PR #120852)

2024-12-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/120852 In case those aren't compound statements. >From a2cf825d002c867804bb65e6f156a87c8da6b07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 21 Dec 2024 20:04:44 +0100 Subject: [PATCH] [cla

[clang] [clang-tools-extra] [lldb] Reapply "[clang] Avoid re-evaluating field bitwidth" (PR #122289)

2025-01-10 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/122289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/122099 See the comment at the beginning of `InterpBuiltinConstantP.h` for an explanation. >From 7fe5944ed5f072c0e74202fd01aa65d87aea3787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 7 Jan

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2025-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From 953ee08b6e8ae9c0b16916e7f31cb9d2f3d5dd8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:54:51 +0100 Subject: [PATCH] Save FieldDecl BitWidth as a ConstantExpr ---

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2025-01-08 Thread Timm Baeder via cfe-commits
tbaederr wrote: Python binding tests fail for unrelated reasons: ``` curl: (23) Failure writing output to destination Error: Restoring cache failed: Error: The process '/usr/bin/sh' failed with exit code 2 ``` https://github.com/llvm/llvm-project/pull/117732

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

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

[clang] [clang-tools-extra] [lldb] Reapply "[clang] Avoid re-evaluating field bitwidth" (PR #122289)

2025-01-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/122289 >From 59abbcc54700d5a8ba31ecd3b37431ffe86f7d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 9 Jan 2025 16:01:59 +0100 Subject: [PATC

[clang] [clang-tools-extra] [lldb] Reapply "[clang] Avoid re-evaluating field bitwidth" (PR #122289)

2025-01-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/122289 >From 59abbcc54700d5a8ba31ecd3b37431ffe86f7d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 9 Jan 2025 16:01:59 +0100 Subject: [PATC

[clang] [clang][bytecode] Register decomposition holding vars (PR #123515)

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

[clang] [clang][bytecode] Fix discarding DerivedToBase casts (PR #123523)

2025-01-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/123523 None >From f5544cfbc4a3223d76f1a388bd4c20d78f14da12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 19 Jan 2025 19:48:31 +0100 Subject: [PATCH] [clang][bytecode] Fix discarding DerivedT

[clang] [clang][bytecode] Register decomposition holding vars (PR #123515)

2025-01-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/123515 None >From 69df4b6dc60426aee3ff61e556c44f81427a0e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 19 Jan 2025 15:49:30 +0100 Subject: [PATCH] [clang][bytecode] Register decomposition

[clang] [libcxxabi] [llvm] [WIP][Clang] Mangling of pack indexing type and expression for itanium (PR #123513)

2025-01-19 Thread Timm Baeder via cfe-commits
@@ -4785,6 +4790,19 @@ void CXXNameMangler::mangleRequirement(SourceLocation RequiresExprLoc, } } +void CXXNameMangler::mangleReferenceToPack(const NamedDecl* Pack) { +if (const TemplateTypeParmDecl *TTP = dyn_cast(Pack)) +mangleTemplateParameter(TTP->getDepth()

[clang] [clang][bytecode][NFC] Use FixedPoint opaque int API (PR #123522)

2025-01-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/123522 Now that we have it, use it. >From 9495bf522c349f8223f890c2581817814f7ba2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 19 Jan 2025 19:39:04 +0100 Subject: [PATCH] [clang][bytecode]

[clang] [clang][bytecode] Fix discarding DerivedToBase casts (PR #123523)

2025-01-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/123523 >From db874d225e0994587ca15384679d070651e0cc99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 19 Jan 2025 19:48:31 +0100 Subject: [PATCH] [clang][bytecode] Fix discarding DerivedToBase

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-01-22 Thread Timm Baeder via cfe-commits
tbaederr wrote: Just a `s/both/expected/` in those two lines should be enough https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Avoid initializer diags if there is no init (PR #123925)

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

[clang] [clang][ExprConst] Let diagnostics point to std::allocator calls (PR #123744)

2025-01-22 Thread Timm Baeder via cfe-commits
@@ -1155,7 +1156,7 @@ namespace { if (CTSD->isInStdNamespace() && ClassII && ClassII->isStr("allocator") && TAL.size() >= 1 && TAL[0].getKind() == TemplateArgument::Type) - return {Call->Index, TAL[0].getAsType()}; + return {Cal

[clang] [clang][bytecode] Use std::allocator calls for Descriptor source (PR #123900)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/123900 >From efa329ed0262d1a8dacbc609094998dbf8157d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Jan 2025 12:31:05 +0100 Subject: [PATCH] [clang][bytecode] Use std::allocator calls for

[clang] [clang][bytecode] Use std::allocator calls for Descriptor source (PR #123900)

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

[clang] [clang][docs] Update bytecode interpreter docs (PR #124252)

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

[clang] [clang][bytecode] Use std::allocator calls for Descriptor source (PR #123900)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/123900 >From 09bb2152cdcb9e9051fe69223d96bb78c53691c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Jan 2025 12:31:05 +0100 Subject: [PATCH] [clang][bytecode] Use std::allocator calls for

[clang] [clang][ExprConst] Let diagnostics point to std::allocator calls (PR #123744)

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

[clang] [clang][bytecode] Use std::allocator calls for Descriptor source (PR #123900)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/123900 >From 35560b9d91793fdf6e0de0f37ada110a5086a4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Jan 2025 12:31:05 +0100 Subject: [PATCH] [clang][bytecode] Use std::allocator calls for

[clang] [clang][docs] Update bytecode interpreter docs (PR #124252)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/124252 Just a light update, not adding a lot of new information. >From 46fc5380ca92e80fc9c7d968f82c8e83eb632aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 24 Jan 2025 11:33:24 +0100 Subje

[clang] [clang][bytecode] Fix dummy handling for p2280r4 (PR #124396)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/124396 This makes some other problems show up like the fact that we didn't suppress diagnostics during __builtin_constant_p evaluation. >From 9abf895d97fe1a5be80e3ae73cd906eb104453fe Mon Sep 17 00:00:00 2001 From: =?

[clang] [clang] improve suggested attribute location for scoped enums (PR #124122)

2025-01-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: I do remember we already had this in https://github.com/llvm/llvm-project/issues/61660 - is that fix not suficcient for c++ style attributes? https://github.com/llvm/llvm-project/pull/124122 ___ cfe-commits mailing list cfe-commits@li

[clang] [Clang] handle [[warn_unused]] attribute for unused private fields (PR #120734)

2025-01-19 Thread Timm Baeder via cfe-commits
@@ -3307,6 +3307,29 @@ void Sema::CheckShadowInheritedFields(const SourceLocation &Loc, } } +template +inline static bool HasAttribute(const QualType &T) { + if (const TagDecl *TD = T->getAsTagDecl()) +return TD->hasAttr(); + if (const TypedefType *TDT = T->getAs())

[clang] [clang][bytecode] Don't memcpy() FixedPoint values (PR #123599)

2025-01-20 Thread Timm Baeder via cfe-commits
@@ -91,6 +91,31 @@ class FixedPoint final { return ComparisonCategoryResult::Greater; } + size_t bytesToSerialize() const { +return sizeof(uint32_t) + (V.getValue().getBitWidth() / CHAR_BIT); tbaederr wrote: Yeah, _if_ I use it, it's just because o

[clang] [clang][bytecode] Fix reporting failed local constexpr initializers (PR #123588)

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

[clang] [clang][bytecode] Don't memcpy() FixedPoint values (PR #123599)

2025-01-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/123599 >From 9a8e5f8f0afd7d5f139862f28e53414a3d9fd7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 20 Jan 2025 13:05:37 +0100 Subject: [PATCH] [clang][bytecode] Don't memcpy() FixedPoint val

<    16   17   18   19   20   21   22   23   24   25   >