[clang] [clang][Interp] Handle nested unions (PR #102743)

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

[clang] [clang][Interp] Don't zero-init unions (PR #102744)

2024-08-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102744 Zero-initializing them would accidentally activate the members. >From b0697976fe655ad9c08e95bc7095d28cda16dfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 10 Aug 2024 13:48:47 +0200

[clang] [clang][Interp] Don't zero-init unions (PR #102744)

2024-08-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102744 >From 40e78a52c9cbbce88f8a5609eccb20d4aa16ce5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 10 Aug 2024 13:48:47 +0200 Subject: [PATCH] [clang][Interp] Only zero-init first union memb

[clang] [clang][Interp] Only zero-init first union member (PR #102744)

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

[clang] [clang][Interp] Only zero-init first union member (PR #102744)

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

[clang] [clang][Interp] Only zero-init first union member (PR #102744)

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

[clang] [clang][Interp] Ignore unnamed bitfields when zeroing records (PR #102749)

2024-08-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102749 Including unions, where this is more important. >From e2a9a796b2beb2dcee0f8ec974cc548427091af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 10 Aug 2024 15:19:55 +0200 Subject: [PATCH

[clang] [clang][Interp] Ignore unnamed bitfields when zeroing records (PR #102749)

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

[clang] [clang][Interp] Fix activating via indirect field initializers (PR #102753)

2024-08-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102753 Pointer::activate() propagates up anyway, so that is handled. But we need to call activate() in any case since the parent might not be a union, but the activate() is still needed. Always call it and hope that

[clang] [clang][Interp] Fix activating via indirect field initializers (PR #102753)

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

[clang] [clang][Interp] Handle union copy/move ctors (PR #102762)

2024-08-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102762 They don't have a body and we need to implement them ourselves. Use the Memcpy op to do that. >From 7c0b32dd559dd5a42ae72d8546c179565be6afc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date:

[clang] [clang][Interp] Handle union copy/move ctors (PR #102762)

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

[clang] Revert "[clang][Interp] Improve "in call to" call argument printing" (PR #102785)

2024-08-10 Thread Timm Baeder via cfe-commits
tbaederr wrote: That test doesn't even use the new constant interpreter? https://github.com/llvm/llvm-project/pull/102785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Properly adjust instance pointer in virtual calls (PR #102800)

2024-08-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102800 None >From 623d80c732da293e8696dbb77cb617b42a49e684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 09:36:55 +0200 Subject: [PATCH] [clang][Interp] Properly adjust instance

[clang] [clang][Interp] Properly adjust instance pointer in virtual calls (PR #102800)

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

[clang] [clang][Interp][NFC] Add a failing test case (PR #102801)

2024-08-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102801 None >From 3085070e4e3ff4a65810123c8489cd31300b19d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 09:48:35 +0200 Subject: [PATCH] [clang][Interp][NFC] Add a failing test c

[clang] [clang][Interp] Properly adjust instance pointer in virtual calls (PR #102800)

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

[clang] [clang][Interp][NFC] Add a failing test case (PR #102801)

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

[clang] [clang][Interp] Propagate InUnion flag to base classes (PR #102804)

2024-08-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102804 None >From d44bc6ce6fdcd6607b987a74c417e48daf304124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 10:25:12 +0200 Subject: [PATCH] [clang][Interp] Propagate InUnion flag to

[clang] [clang][Interp] Propagate InUnion flag to base classes (PR #102804)

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

[clang] [clang][llvm-lit] Rewrite constexpr vectors test to use element access (PR #102757)

2024-08-11 Thread Timm Baeder via cfe-commits
@@ -1,10 +1,6 @@ -// RUN: %clang_cc1 -std=c++14 -Wno-unused-value %s -disable-llvm-passes -triple x86_64-linux-gnu -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -Wno-uninitialized -std=c++17 -fsyntax-only -verify tbaederr wrote: Why did the c++ standard

[clang] [clang][llvm-lit] Rewrite constexpr vectors test to use element access (PR #102757)

2024-08-11 Thread Timm Baeder via cfe-commits
@@ -1,10 +1,6 @@ -// RUN: %clang_cc1 -std=c++14 -Wno-unused-value %s -disable-llvm-passes -triple x86_64-linux-gnu -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -Wno-uninitialized -std=c++17 -fsyntax-only -verify tbaederr wrote: Yes please, so we can kee

[clang] [clang][Interp] Fix diagnosing uninitialized nested union fields (PR #102824)

2024-08-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102824 We were calling initialize() unconditionally when copying the union. >From 639c0678f29c6a3936a30a35810552a54590aa18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 19:52:51

[clang] [clang][Interp] Fix diagnosing uninitialized nested union fields (PR #102824)

2024-08-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102824 >From 983411854aeb39a0ddba04f5d30b6aa284c297bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 19:52:51 +0200 Subject: [PATCH] [clang][Interp] Fix diagnosing uninitialized ne

[clang] [clang][Interp] Fix diagnosing uninitialized nested union fields (PR #102824)

2024-08-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102824 >From 618e8c138544bab863da0d6595c6a9f38426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 19:52:51 +0200 Subject: [PATCH] [clang][Interp] Fix diagnosing uninitialized ne

[clang] [clang][Interp] Fix diagnosing uninitialized nested union fields (PR #102824)

2024-08-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102824 >From d996308e8420f7735095c1118430531509e9264d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 19:52:51 +0200 Subject: [PATCH] [clang][Interp] Fix diagnosing uninitialized ne

[clang] [clang][Interp] Compile field+base destruction into class dtor func (PR #102871)

2024-08-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/102871 None >From 1f04d85c024520ed0399ce3a363211f77c69d68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 Aug 2024 11:45:27 +0200 Subject: [PATCH] [clang][Interp] Compile field+base destru

[clang] [clang][llvm-lit] Rewrite constexpr vectors test to use element access (PR #102757)

2024-08-12 Thread Timm Baeder via cfe-commits
tbaederr wrote: LGTM from my side but I added some other reviewers in case they have more comments. https://github.com/llvm/llvm-project/pull/102757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang][Interp] Compile field+base destruction into class dtor func (PR #102871)

2024-08-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102871 >From c906a9932b68485e40b368cecd7f4b5c83fb47d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 Aug 2024 11:45:27 +0200 Subject: [PATCH] [clang][Interp] Compile field+base destruction

[clang] [clang][Interp] Compile field+base destruction into class dtor func (PR #102871)

2024-08-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102871 >From 01849578372cc922562a97f1cfa034b30c0ac6d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 Aug 2024 11:45:27 +0200 Subject: [PATCH] [clang][Interp] Compile field+base destruction

[clang] [clang][Interp] Compile field+base destruction into class dtor func (PR #102871)

2024-08-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102871 >From 3c780a997df63f6c60d25d34067675af30c9ca02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 Aug 2024 11:45:27 +0200 Subject: [PATCH] [clang][Interp] Compile field+base destruction

[clang] [clang][Interp] Fix diagnosing uninitialized nested union fields (PR #102824)

2024-08-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102824 >From e0c9d600c95b2d97a749b53c165fb865bb75414e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 19:52:51 +0200 Subject: [PATCH] [clang][Interp] Fix diagnosing uninitialized ne

[clang] [clang][Interp] Compile field+base destruction into class dtor func (PR #102871)

2024-08-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102871 >From 390f3a513722f4f00013dd3213ca5d1f672a0c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 Aug 2024 11:45:27 +0200 Subject: [PATCH] [clang][Interp] Compile field+base destruction

[clang] [clang][Interp] Fix diagnosing uninitialized nested union fields (PR #102824)

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

[clang] [clang][Interp][NFC] Move _Complex compiler code to separate file (PR #103004)

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

[clang] [clang][Interp] Diagnose pointer subtraction on zero-size arrays (PR #103015)

2024-08-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/103015 None >From 0d5bad32df4b65a38604bb51b64a4b2ca3cc40ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 13 Aug 2024 09:16:58 +0200 Subject: [PATCH] [clang][Interp] Diagnose pointer subtract

[clang] [clang][Interp] Diagnose pointer subtraction on zero-size arrays (PR #103015)

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

[clang] [clang][llvm-lit] Rewrite constexpr vectors test to use element access (PR #102757)

2024-08-14 Thread Timm Baeder via cfe-commits
tbaederr wrote: can you do `git pull origin main --rebase` and force push the result to your branch, so we can get CI coverage for linux? https://github.com/llvm/llvm-project/pull/102757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [clang][Interp] Use first field decl for Record field lookup (PR #104412)

2024-08-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104412 None >From cbc62389a992fddfbf9ef7362367b816e2810f40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 09:32:16 +0200 Subject: [PATCH] [clang][Interp] Use first field decl for

[clang] [clang][Interp] Add scopes to conditional operator subexpressions (PR #104418)

2024-08-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104418 We would otherwise try to destroy the variables from both branches after the conditional operator was done. However, doing so breaks the case where we create internal temporaries. For those, add allocateTempo

[clang] [clang][Interp] Pass callee decl to null_callee diagnostics (PR #104426)

2024-08-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104426 The callee is null, not the full call expression. >From 1d4f1403b65f9b1b5c5655e73217beee50b104eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 12:06:57 +0200 Subject: [PAT

[clang] [clang][Interp] Pass callee decl to null_callee diagnostics (PR #104426)

2024-08-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104426 >From d81f019bd9b64bcff46a939528ce05ddf4bb31f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 12:06:57 +0200 Subject: [PATCH] [clang][Interp] Pass callee decl to null_callee

[clang] [clang][Interp] Pass callee decl to null_callee diagnostics (PR #104426)

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

[clang] [clang][Interp] Use first field decl for Record field lookup (PR #104412)

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

[clang] [clang][Interp] Call move function for certain primitive types (PR #104437)

2024-08-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104437 None >From 36c5f883ede65c2ca245354b1c55ac56edec1683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 15:51:22 +0200 Subject: [PATCH] [clang][Interp] Call move function for ce

[clang] [clang][Interp] Call move function for certain primitive types (PR #104437)

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

[clang] [clang][Interp] Support blocks (PR #104551)

2024-08-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104551 I started out by adding a new pointer type for blocks, and I was fully prepared to compile their AST to bytecode and later call them. ... then I found out that the current interpreter doesn't support calling

[clang] [clang][Interp] Support blocks (PR #104551)

2024-08-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104551 >From 1d03ec1fd0066b8e73c1ae969b9235936ba7ae7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 20:31:38 +0200 Subject: [PATCH] [clang][Interp] Support blocks --- clang/lib/

[clang] [clang][Interp] Support ObjC blocks (PR #104551)

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

[clang] [clang][Interp] Add scopes to conditional operator subexpressions (PR #104418)

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

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

2024-08-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104552 "Interp" clashes with the clang interpreter and people often confuse this. >From a4a8254c45fa220d3a25e3951069106667f3a280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 Aug 2024 08:

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104552 >From c140ef583e6bdff8c7ac829be1ede32460663564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 Aug 2024 08:42:16 +0200 Subject: [PATCH] [clang] Rename all AST/Interp stuff to AST/Byte

[clang] [clang][Interp] Support ObjC blocks (PR #104551)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104551 >From fdf77974e37a8b38d2ab3e184371417fdec1e952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 20:31:38 +0200 Subject: [PATCH] [clang][Interp] Support blocks --- clang/lib/

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104552 >From 42c79911d0138d45c425e42cc19bef5e84a67e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 Aug 2024 08:42:16 +0200 Subject: [PATCH] [clang] Rename all AST/Interp stuff to AST/Byte

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

2024-08-16 Thread Timm Baeder via cfe-commits
tbaederr wrote: Code formatting is clean locally :shrug: https://github.com/llvm/llvm-project/pull/104552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Support ObjC blocks (PR #104551)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104551 >From 24a00c98538038c5fd7f01789b8b819c3c562a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 20:31:38 +0200 Subject: [PATCH] [clang][Interp] Support blocks --- clang/lib/

[clang] [clang][Interp] Fix classifying enum types (PR #104582)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/104582 We used to always return PT_IntAP(s) for them. >From b838d2c2c71868ef48b8357c744e5b8d41ba5d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 Aug 2024 13:48:44 +0200 Subject: [PATCH]

[clang] [clang][Interp] Fix classifying enum types (PR #104582)

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

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104552 >From 28ff098c7627adc052f90d968f449afb8cb38d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 Aug 2024 08:42:16 +0200 Subject: [PATCH] [clang] Rename all AST/Interp stuff to AST/Byte

[clang] [clang] Rename all AST/Interp stuff to AST/ByteCode (PR #104552)

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

[clang] [clang][Interp] Support ObjC blocks (PR #104551)

2024-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/104551 >From e4e5a35bf25f8f95ea39765692d0280b906dd625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Aug 2024 20:31:38 +0200 Subject: [PATCH] [clang][Interp] Support blocks --- clang/lib/

[clang] Fix/interp init list unnamed bitfields (PR #87799)

2024-04-05 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,114 @@ +// UNSUPPORTED: asserts +// REQUIRES: asserts +// ^ this attempts to say "don't actually run this test", because it's broken tbaederr wrote: It's broken even with the changes in this PR? https://github.com/llvm/llvm-project/pull/87799

[clang] Fix/interp init list unnamed bitfields (PR #87799)

2024-04-05 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,114 @@ +// UNSUPPORTED: asserts +// REQUIRES: asserts +// ^ this attempts to say "don't actually run this test", because it's broken +// +// The point of this test is to demonstrate something that ExprConstant accepts, +// but Interp rejects. I had hoped to express tha

[clang] Fix/interp init list unnamed bitfields (PR #87799)

2024-04-05 Thread Timm Baeder via cfe-commits
@@ -884,8 +884,36 @@ bool ByteCodeExprGen::visitInitList(ArrayRef Inits, if (!this->emitDupPtr(E)) return false; +// guard relatively expensive base check behind an almost-always-false tbaederr wrote: The comment sounds like this is just a perf

[clang] Fix/interp init list unnamed bitfields (PR #87799)

2024-04-07 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,114 @@ +// UNSUPPORTED: asserts +// REQUIRES: asserts +// ^ this attempts to say "don't actually run this test", because it's broken tbaederr wrote: In this case, I would fix the other bug first. https://github.com/llvm/llvm-project/pull/87799 ___

[clang] Fix/interp init list unnamed bitfields (PR #87799)

2024-04-07 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,114 @@ +// UNSUPPORTED: asserts +// REQUIRES: asserts +// ^ this attempts to say "don't actually run this test", because it's broken +// +// The point of this test is to demonstrate something that ExprConstant accepts, +// but Interp rejects. I had hoped to express tha

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-04-08 Thread Timm Baeder via cfe-commits
@@ -11444,9 +11444,12 @@ static void DiagnoseBadShiftValues(Sema& S, ExprResult &LHS, ExprResult &RHS, llvm::APSInt Right = RHSResult.Val.getInt(); if (Right.isNegative()) { -S.DiagRuntimeBehavior(Loc, RHS.get(), - S.PDiag(diag::warn_shift_neg

[clang] [clang] Improve source location in binary type traits diagnostics (PR #88097)

2024-04-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Do we now have enough information to pass a source range as well? https://github.com/llvm/llvm-project/pull/88097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Fix static analyzer concern (PR #88179)

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

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-04-09 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?= Message-ID: In-Reply-To: @@ -1912,6 +1929,10 @@ inline bool NoRet(InterpState &S, CodePtr OpPC) { inline bool NarrowPtr(InterpS

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-04-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/84159 >From 3d6a09d1324dbd354668b0341644fb70fe09a47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 6 Mar 2024 08:36:52 +0100 Subject: [PATCH] [clang][Interp] Integral pointers --- clang/lib

[clang] [clang][Interp] Integral pointers (PR #84159)

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

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-04-11 Thread Timm Baeder via cfe-commits
@@ -22,7 +22,11 @@ class FunctionPointer final { const Function *Func; public: - FunctionPointer() : Func(nullptr) {} + // FIXME: We might want to track the fact that the Function pointer + // has been created from an integer and is most likely garbage anyway. + Function

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-04-11 Thread Timm Baeder via cfe-commits
@@ -22,7 +22,11 @@ class FunctionPointer final { const Function *Func; public: - FunctionPointer() : Func(nullptr) {} + // FIXME: We might want to track the fact that the Function pointer + // has been created from an integer and is most likely garbage anyway. + Function

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-06-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 471d7a14b6475c4d06365b01ac35847276a464ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:33:30 +0200 Subject: [PATCH] [clang][Interp] Implement dynamic memory allocat

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-06-05 Thread Timm Baeder via cfe-commits
tbaederr wrote: Rebased and updated with a lot more tests. https://github.com/llvm/llvm-project/pull/70306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-06-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/91303 >From 34a35dfa66835b8810e27899c9c7978de191f8e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 10 Apr 2024 16:42:36 +0200 Subject: [PATCH] Memberpointers --- clang/lib/AST/CMakeLists.tx

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-06-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/91303 >From 922a2239a69efe5136a9c8229ef223bfbaad2fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 10 Apr 2024 16:42:36 +0200 Subject: [PATCH] Memberpointers --- clang/lib/AST/CMakeLists.tx

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-06-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/91303 >From 0f047f686ac69549834bfbfdecaa6383c6ab5305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 10 Apr 2024 16:42:36 +0200 Subject: [PATCH] Memberpointers --- clang/lib/AST/CMakeLists.tx

[clang] [clang] NFCI: Make ASTContext optional in the AST text dumper again (PR #94522)

2024-06-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. Can't say much about this functionally, but it fixes my problems, so LGTM from that side. https://github.com/llvm/llvm-project/pull/94522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-06-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. LGTM. I guess we should close https://github.com/llvm/llvm-project/pull/89449 after merging this. https://github.com/llvm/llvm-project/pull/93046 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][Interp] Member Pointers (PR #91303)

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

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

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

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

2024-06-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: @AaronBallman Is the prototype of the implementation here at least sound? Or should this go somewhere completely different? Maybe in one of the TSA source files? https://github.com/llvm/llvm-project/pull/67520 ___ cfe-commits mailing

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

2024-06-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: > Out of curiosity, why are they not using `__builtin_complex` as requested? I started out replacing a lot of those expressions with `__builtin_complex` but ended up just creating a variable for it so the lines don't get too unwieldy. But then I naturally just used an initlist

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

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

[clang] [clang][Interp] Implement Complex-complex multiplication (PR #94891)

2024-06-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/94891 Share the implementation for floating-point complex-complex multiplication with the current interpreter. This means we need a new opcode for this, but there's no good way around that. >From b89efd9e0e38a6e7913

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-09 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/94892 Depends on the multiplication PR. >From b89efd9e0e38a6e79130e0a1b9e8d0443654c6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 9 Mar

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-09 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/94892 >From b89efd9e0e38a6e79130e0a1b9e8d0443654c6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 9 Mar 2024 17:07:24 +0100 Subject: [PATCH

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-10 Thread Timm Baeder via cfe-commits
tbaederr wrote: @a-tarasyuk Do you need someone else to merge this? https://github.com/llvm/llvm-project/pull/94123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

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

[clang] [clang] SourceLocIdentKind::Function should not be dependent (PR #94942)

2024-06-10 Thread Timm Baeder via cfe-commits
@@ -846,6 +846,7 @@ Bug Fixes to C++ Support - Fix a crash caused by improper use of ``__array_extent``. (#GH80474) - Fixed several bugs in capturing variables within unevaluated contexts. (#GH63845), (#GH67260), (#GH69307), (#GH88081), (#GH89496), (#GH90669) and (#GH91633).

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

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

[clang] [clang][Interp] Implement complex division (PR #94892)

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

[clang] [clang][Interp] Implement Complex-complex multiplication (PR #94891)

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

[clang] [clang][Interp] Implement Complex-complex multiplication (PR #94891)

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

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Timm Baeder via cfe-commits
@@ -,13 +,18 @@ static CanThrowResult canDynamicCastThrow(const CXXDynamicCastExpr *DC) { } static CanThrowResult canTypeidThrow(Sema &S, const CXXTypeidExpr *DC) { - if (DC->isTypeOperand()) + // Operand is not evaluated, cannot possibly throw tbae

[clang] [Clang] [Sema] Ensure noexcept(typeid(E)) checks if E throws when needed (PR #95846)

2024-06-17 Thread Timm Baeder via cfe-commits
@@ -,13 +,18 @@ static CanThrowResult canDynamicCastThrow(const CXXDynamicCastExpr *DC) { } static CanThrowResult canTypeidThrow(Sema &S, const CXXTypeidExpr *DC) { - if (DC->isTypeOperand()) + // Operand is not evaluated, cannot possibly throw + if (!DC->isPotenti

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/94892 >From 7a1c16f2fe0b23ffe49789275ffa66b2ac64c4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 9 Jun 2024 09:25:24 +0200 Subject: [PATCH] [clang][Interp] Implement Complex division ---

[clang] [clang] Remove update_options_td_flags.py (PR #95909)

2024-06-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/95909 The comment says: > This script will be removed after the next LLVM release. but it's still there. Change that. >From 0137a56765c1486b461c21c36d5977469fd6ffef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=

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