[clang] [clang][bytecode] Return Invalid() on non-constexpr builtins (PR #133700)

2025-03-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/133700 So the diagnostic output matches with the current interpreter >From 172f1381f0a342ad89a85c6b3b63e893a961c827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 31 Mar 2025 13:15:32 +0200 S

[clang] [clang][bytecode][NFC] Add assert to ptrauth_string_discriminator (PR #132527)

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

[clang] [clang][bytecode] Support overlapping regions in __builtin_memmove (PR #132523)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132523 Unfortunately, a few circumstances make the implementation here less than ideal, but we need to handle overlapping regions anyway. >From edec53dcbc6e340b9817c9f20fd0615ec6610e35 Mon Sep 17 00:00:00 2001 From:

[clang] [clang][bytecode] Fix __builtin_memmove type diagnostics (PR #132544)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132544 Set the source type when allocating primitives so we can later retrieve it. >From f3b1b585fba64dd6eeb9cdac8a74a49130c141bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 22 Mar 2025 13

[clang] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well (PR #132550)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132550 For consistency. >From 680d56fa84ce7a1ac98525f9ca61896b58e4398f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 22 Mar 2025 15:23:07 +0100 Subject: [PATCH] [clang][bytecode][NFC] Use ge

[clang] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well (PR #132550)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/132550 >From 060f275678f831a12b07af626919615e468165c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 22 Mar 2025 15:23:07 +0100 Subject: [PATCH] [clang][bytecode][NFC] Use getElemType() in __b

[clang] [clang][bytecode] Add Descriptor::getDataType() (PR #132681)

2025-03-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/132681 >From 03eec455e6f981647cf9638e4747d3f48cde19fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 23 Mar 2025 20:30:46 +0100 Subject: [PATCH] [clang][bytecode] Add Descriptor::getDataType()

[clang] [clang][bytecode] Add Descriptor::getDataType() (PR #132681)

2025-03-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132681 This returns the type of data in the Block, which might be different than the type of the expression or declaration we created the block for. This lets us remove some special cases from CheckNewDeleteForms() a

[clang] [clang][bytecode] Fix union copy/move operator active check (PR #132238)

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

[clang] [clang][ExprConst] Check record base classes for valid structs (PR #132270)

2025-03-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132270 In error cases, the base might be None. Fixes https://github.com/llvm/llvm-project/issues/132257 >From 63f8f058a14286bd29a2c54307a90d326ac57aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Dat

[clang] [clang][bytecode] Diagnose integral source/dest in memcpy (PR #132715)

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

[clang] [clang][bytecode] Implement __builtin_{wcscmp, wcsncmp} (PR #132723)

2025-03-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132723 None >From 483bb2ce006f980e781ce8756f43cc87683f522c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 24 Mar 2025 13:15:33 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_{wc

[clang] [clang][bytecode] Diagnose integral source/dest in memcpy (PR #132715)

2025-03-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132715 Like the current interpreter does. >From 698d310421651db1320d3a60fd7fa9a44c25627e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 24 Mar 2025 12:05:57 +0100 Subject: [PATCH] [clang][byt

[clang] [clang][bytecode] Add Descriptor::getDataType() (PR #132681)

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

[clang] [clang][bytecode] Implement __builtin_wcschr (PR #132708)

2025-03-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132708 This is already almost implemented, just need to enable support for it. >From 2355ce241b16a4b0d9839f010b90f338ba416a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 24 Mar 2025 11:38:

[clang] [clang][bytecode] Implement __builtin_wcschr (PR #132708)

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

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-25 Thread Timm Baeder via cfe-commits
@@ -11432,6 +11433,22 @@ static QualType mergeEnumWithInteger(ASTContext &Context, const EnumType *ET, return {}; } +QualType ASTContext::mergeTagTypes(QualType LHS, QualType RHS) { + // C17 and earlier and C++ disallow two tag definitions within the same TU + // from bei

[clang] [clang][bytecode] Reject constexpr-unknown values from comparisons (PR #133701)

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

[clang] [clang][bytecode] Fix comparing the addresses of union members (PR #133852)

2025-04-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/133852 >From 2bad7af8f9fef1d7497183d0cb30df05eee00978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 1 Apr 2025 06:07:19 +0200 Subject: [PATCH] [clang][bytecode] Fix comparing the addresses of

[clang] [clang][ExprConst] Check for array size of initlists (PR #138673)

2025-05-07 Thread Timm Baeder via cfe-commits
tbaederr wrote: That comment is obsolete, I've added two test cases that work https://github.com/llvm/llvm-project/pull/138673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Remove unused function (PR #139355)

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

[clang] [clang][bytecode][NFC] Remove unused function (PR #139355)

2025-05-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139355 None >From a7aba9984f3a01d07d8e90c64bea7d9c9fd328a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 10 May 2025 07:19:37 +0200 Subject: [PATCH] [clang][bytecode][NFC] Remove unused func

[clang] [clang][ExprConstant] Bail out on invalid lambda capture inits (PR #138832)

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

[clang] [clang][ExprConst] Check for array size of initlists (PR #138673)

2025-05-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/138673 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [clang][NFC] Use BuiltinType::isFloatingPoint() in Type::isFloatingType() (PR #139035)

2025-05-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139035 They both used to do the same comparison of getKind() to Half and Ibm128. Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; fo

[clang] [clang][NFC] Use BuiltinType::isFloatingPoint() in Type::isFloatingType() (PR #139035)

2025-05-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/139035 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [clang][NFC] Use BuiltinType::isFloatingPoint() in Type::isFloatingType() (PR #139035)

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

[clang] [clang][bytecode] Reorder type checks in classify() (PR #139046)

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

[clang] [clang][bytecode] Save Immediate bit in Function (PR #139671)

2025-05-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 closed https://github.com/llvm/llvm-project/pull/139671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139709 The passed indices have to be constant integers anyway, which we verify before creating the ShuffleVectorExpr. Use the value we create there and save the indices using a ConstantExpr instead. This way, we don'

[clang] [clang][bytecode][NFC] Delete DynamicAllocator copy/move ctors (PR #139710)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139710 They should never be needed. Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,S

[clang] [clang][bytecode] Get BuiltinID from the direct callee (PR #139675)

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

[clang] [clang][bytecode][NFC] Remove incorrect comment (PR #139571)

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

[clang] [AST] Use llvm::upper_bound (NFC) (PR #139664)

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

[clang] [clang][bytecode] Save Immediate bit in Function (PR #139671)

2025-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139671 Otherwise, we have to look at the FunctionDecl at every function call. >From dbfd167600797aea5dcc34fc2f6d9e6659363bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 May 2025 17:59:3

[clang] [clang][bytecode] Optimize enum value range checks (PR #139672)

2025-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139672 Only do the work if we really have to. Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSy

[clang] [clang][bytecode] Avoid classifying in visitArrayElemInit() (PR #139674)

2025-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139674 We usually call this more than once, but the type of the initializer never changes. Let's classify only once and pass that to visitArrayElemInit(). Rate limit · GitHub b

[clang] [clang][bytecode] Slightly optimize integral casts of literals (PR #138879)

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

[clang] [clang][ExprConst] Check for array size of initlists (PR #138673)

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

[clang] [clang][ExprConst] Check for array size of initlists (PR #138673)

2025-05-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/138673 >From 224ff74f7cd2460414c96e8b528e8f086535da5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 6 May 2025 12:36:24 +0200 Subject: [PATCH] [clang][ExprConst] Check for array size of initl

[clang] [clang][bytecode][NFC] Remove incorrect comment (PR #139571)

2025-05-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139571 We don't create function frames for builtin functions anymore. Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family:

[clang] [clang][bytecode] Optimize enum value range checks (PR #139672)

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

[clang] [clang][bytecode] Avoid classifying in visitArrayElemInit() (PR #139674)

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

[clang] [clang][bytecode] Save Immediate bit in Function (PR #139671)

2025-05-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/139671 >From dbfd167600797aea5dcc34fc2f6d9e6659363bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 May 2025 17:59:38 +0200 Subject: [PAT

[clang] [clang][bytecode] Save Immediate bit in Function (PR #139671)

2025-05-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/139671 >From 17963fa2a3af608c861dee3edf5b45b7b0dd18cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 12 May 2025 17:

[clang] [clang][bytecode][NFC] Delete DynamicAllocator copy/move ctors (PR #139710)

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

[clang] [clang][NFC] Clean up Expr::isTemporaryObject() (PR #140229)

2025-05-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/140229 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [clang][bytecode] Explicitly start variable lifetimes via placement new (PR #140221)

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

[clang] [clang][bytecode][NFC] Avoid an implicit integer conversion (PR #139845)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139845 getCharByteWidth() returns an unsigned. >From 4fa9f128a32eb30865cbf760c13091b6804a87c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 14 May 2025 06:57:39 +0200 Subject: [PATCH] [clang

[clang] [clang][bytecode] Use IsNonNull op in visitBool() (PR #139846)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/139846 We don't need to emit the nullptr and compare to it anymore. >From 0339fcfd54521c35b3612e2c91805dc179ed9fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 14 May 2025 06:57:55 +0200 Su

[clang] [clang][bytecode] Use IsNonNull op in visitBool() (PR #139846)

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

[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)

2025-05-14 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/139709 >From d90661aac34ae311f2d550ca0391e9e5232eb585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 13 May 2025 11:59:56 +0200 Subject: [PAT

[clang] [clang][bytecode] Diagnose failed constexpr assertions differently (PR #140000)

2025-05-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/14 Adjust to the new way the ast walker is doing it. >From 91b2beec47f191dc33714b82363a5b6ebe68eef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 May 2025 06:13:12 +0200 Subject: [PAT

[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)

2025-05-13 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/139709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)

2025-05-14 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/139709 >From d90661aac34ae311f2d550ca0391e9e5232eb585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 13 May 2025 11:59:56 +0200 Subject: [PAT

[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)

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

[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)

2025-05-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/139709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [clang][bytecode][NFC] Avoid an implicit integer conversion (PR #139845)

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

[clang] [clang][NFC] Clean up Expr::isTemporaryObject() (PR #140229)

2025-05-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140229 None >From ed50778c68265d3e77f853b1d0409ef795512c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 May 2025 11:42:53 +0200 Subject: [PATCH] [clang][NFC] Clean up Expr::isTemporaryOb

[clang] [clang][NFC] Clean up Expr::isTemporaryObject() (PR #140229)

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

[clang] [clang][bytecode] Add a scope to function calls (PR #140441)

2025-05-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140441 We need a place to destroy the temporaries created for call arguments. >From 47a04ed14736a66d6f437e704322397ca3b2d255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 16 May 2025 12:47:3

[clang] [clang][bytecode] Check downcasts for the correct type (PR #140689)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140689 In multiple inheritance/diamond scenarios, we might arrive at the wrong type. >From b8d7be498693a889898a85eed4ce24cbc04f0d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 20 May 2025

[clang] [clang][bytecode] Check downcasts for the correct type (PR #140689)

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

[clang] [clang][bytecode] Diagnose comparisons of unrelated zero-sized pointers (PR #140695)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140695 None >From 85be774cdec6ebaac96ca16e753d39237deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 20 May 2025 11:17:46 +0200 Subject: [PATCH] [clang][bytecode] Diagnose comparisons of

[clang] [clang][bytecode] Optimize classify() further (PR #140735)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/140735 >From a1979e88d05ed198700b90c3b5530d451cde9c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 20 May 2025 12:35:30 +0200 Subject: [PATCH] [clang][bytecode] Optimize classify() further

[clang] [clang][bytecode] Optimize classify() further (PR #140735)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140735 Try to do as few checks as possible. Check for builtin types only once, then look at the BuiltinType Kind. For integers, we cache the int and long size, since those are used a lot and the ASTContext::getIntWid

[clang] [clang][bytecode][NFC] Remove Frame.cpp (PR #140750)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140750 The file was basically empty. The actual implementation for function frames of the two interpreter life in their own respective files. >From c6ca3e84103a6c80ea0ecd741a38ba3ce22005ae Mon Sep 17 00:00:00 2001 Fr

[clang] [clang][bytecode] Check downcasts for the correct type (PR #140689)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/140689 >From f1fced9ca8e23ccc4092c2359f9d385fbbaad58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 20 May 2025 09:06:15 +0200 Subject: [PATCH] [clang][bytecode] Check downcasts for the corre

[clang] [clang][bytecode] Diagnose comparisons of unrelated zero-sized pointers (PR #140695)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/140695 >From 6cfad141013ce10943335713bc6b5c2e85348f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 20 May 2025 11:17:46 +0200 Subject: [PATCH] [clang][bytecode] Diagnose comparisons of unrel

[clang] [Clang] suggest headers on undeclared errors (PR #140247)

2025-05-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: I can only review this on a high level, so CC @AaronBallman to check if this is happening at the right level. https://github.com/llvm/llvm-project/pull/140247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang][bytecode] Initialize global strings via memcpy (PR #140789)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140789 If we know the char width is 1, we can just copy the data over instead of going through the Pointer API. >From a4209fc8d9e93d5a7e080bd3cfab0d6cef37a102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der

[clang] [clang][NFC] Clean up ASTContext.cpp (PR #140847)

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

[clang] [clang][NFC] Clean up ASTContext.cpp (PR #140847)

2025-05-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140847 Use BuiltinType::{isInteger,isSignedInteger,isUnsignedInteger} instead of doing the comparisons here. >From 8c1a0e2860725a61de4a560b63272baf4cd400b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?=

[clang] [clang][bytecode] Optimize classify() further (PR #140735)

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

[clang] [clang][bytecode] Initialize global strings via memcpy (PR #140789)

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

[clang] [clang][bytecode] Use a SmallVector for EvalEmitter's locals (PR #140513)

2025-05-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140513 The offset we return for them are just indices, so we can use a vector here. >From e4bcf674619283cd0d7a7d4e613a5621de17ca66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 17 May 2025 1

[clang] [clang][bytecode] Use a SmallVector for EvalEmitter's locals (PR #140513)

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

[clang] [clang][bytecode] Add a scope to function calls (PR #140441)

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

[clang] [clang][bytecode] Diagnose failed constexpr assertions differently (PR #140000)

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

[clang] [clang][bytecode] Do not diagnose volatile reads in CPCE mode (PR #140546)

2025-05-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140546 This matches the diagnostic output of the current interpreter. >From b13e6121e940c96f42febb327f2ee0191e19faaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 19 May 2025 16:14:49 +0200

[clang] [clang][bytecode][NFC] Simplify VisitCompoundLiteralExpr (PR #140547)

2025-05-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/140547 None >From ba9bf827b8b599a127247222ef9177bd92df42c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 19 May 2025 16:24:29 +0200 Subject: [PATCH] [clang][bytecode][NFC] Simplify VisitComp

[clang] [clang][bytecode][NFC] Simplify VisitCompoundLiteralExpr (PR #140547)

2025-05-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/140547 >From 9592150674b5d6b6141d126bf2c291464026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 19 May 2025 16:24:29 +0200 Subject: [PATCH] [clang][bytecode][NFC] Simplify VisitCompoundLi

[clang] [clang][bytecode][NFC] Simplify VisitCompoundLiteralExpr (PR #140547)

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

[clang] [clang][bytecode] Do not diagnose volatile reads in CPCE mode (PR #140546)

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

[clang] [clang][bytecode] Diagnose failed constexpr assertions differently (PR #140000)

2025-05-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/14 >From e1d5efd0d039ca50bd18cc74cb8e4ccf2b5fbe78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 May 2025 06:13:12 +0200 Subject: [PATCH] [clang][bytecode] Diagnose failed constexpr ass

[clang] [clang][OpenCL] Only evaluate initializer once to check for zero init (PR #141474)

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

[clang] [clang][Lex][NFC] Reorder SrcMgr checks in CheckMacroName (PR #141483)

2025-05-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/141483 isInPredefinedFile() will look at the presumed loc, which is comparatively slow. Move it after isInSystemFile(). http://llvm-compile-time-tracker.com/compare.php?from=843e362318e884991e517a54446b4faeacdad789&t

[clang] [clang][NFC] Call Stmt::getBeginLoc() once in DiagnoseForRangeVariable (PR #141472)

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

[clang] [clang][ExprConst][NFC] Only call getExprLoc() once (PR #141473)

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

[clang] [clang][NFC] Move Diags.isIgnored check later in checkForRedundantLoop (PR #141470)

2025-05-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/141470 ... Iteration. >From 8849adcac5ffb09c72aa0e270891d508f074add3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 26 May 2025 12:21:04 +0200 Subject: [PATCH] [clang][NFC] Move Diags.isIgnor

[clang] [clang][OpenCL] Only evaluate initializer once to check for zero init (PR #141474)

2025-05-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/141474 Both Expr::isIntegerConstantExpr() and Epxr::EvaluateKnownConstInt() evaluate the expression. Just do it once and check the integer result. >From 000188d3650923c7747aeeb8f7d02786f8243bf0 Mon Sep 17 00:00:00 20

[clang] [clang][NFC] Call Stmt::getBeginLoc() once in DiagnoseForRangeVariable (PR #141472)

2025-05-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/141472 ...Copies. Instead of three times. >From 789064d5997ace0ed145a8d15e1b00452ff33305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 26 May 2025 12:22:51 +0200 Subject: [PATCH] [clang][NFC

[clang] [clang][ExprConst][NFC] Only call getExprLoc() once (PR #141473)

2025-05-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/141473 It's potentially costly, so only do it once. >From 6aab696419ca3762237461e2be46c96015dac4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 26 May 2025 12:17:24 +0200 Subject: [PATCH] [

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/141471 Reorder the precondition checks to move the costly onces last. Also, only evaluate the RHS once to get the integral value. >From 7b0a2b83146623a1674967ff4353a9eea6efd25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: http://llvm-compile-time-tracker.com/compare.php?from=843e362318e884991e517a54446b4faeacdad789&to=7b0a2b83146623a1674967ff4353a9eea6efd25e&stat=instructions:u https://github.com/llvm/llvm-project/pull/141471 ___ cfe-commits mailing list

[clang] [clang][Sema] Cleanup and optimize DiagnoseAssignmentEnum (PR #141471)

2025-05-26 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/141471 >From 7b0a2b83146623a1674967ff4353a9eea6efd25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 26 May 2025 12:19:22 +0200 Subject: [PAT

[clang] [clang][Lex] Use getBufferName() in isInPredefinedFile() (PR #141490)

2025-05-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/141490 I don't think this depends on #line directives, to it should be fine to use getBufferName. >From e8e0bddda7dcc5e64624912e68f5de8d7ff485eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon

[clang] [clang][Lex] Use getBufferName() in isInPredefinedFile() (PR #141490)

2025-05-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: http://llvm-compile-time-tracker.com/compare.php?from=0917b0525b49f0d8fe64e26947449c55db5fc00a&to=65f3db15d875c7279c95afdd2a9221ec43dc61b4&stat=instructions:u https://github.com/llvm/llvm-project/pull/141490 ___ cfe-commits mailing list

[clang] [clang][Lex] Use getBufferName() in isInPredefinedFile() (PR #141490)

2025-05-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: Damn https://github.com/llvm/llvm-project/pull/141490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Lex] Use getBufferName() in isInPredefinedFile() (PR #141490)

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

<    21   22   23   24   25   26   27   >