[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-30 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/112126 >From 3e028394eb4f3ce9796359e3122cbc86270e43f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 13 Oct 2024 08:

[clang] [clang][bytecode] Add more checks to _ai32_* builtins (PR #114412)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114412 >From 946f978b15746b3e1561d4e9001a0cd966315959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 16:00:31 +0100 Subject: [PATCH] [clang][bytecode] Add more checks to _ai32_* bu

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-31 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/112126 ___ cfe-commits ma

[clang] [clang][bytecode] Add more checks to _ai32_* builtins (PR #114412)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114412 >From 1f04efbda5089aa4550ad2d7fc3af470fa30f3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 16:00:31 +0100 Subject: [PATCH] [clang][bytecode] Add more checks to _ai32_* bu

[clang] [clang][bytecode] Add more checks to _ai32_* builtins (PR #114412)

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

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

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

[clang] [clang][bytecode][NFC] Switch BitcastBuffer to SmallVector (PR #114677)

2024-11-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114677 This is a little easier to work with since we are guaranteed that the item type of the vector is byte sized and not something else. >From eabd705ce8a970250363d05622c8547580c496d4 Mon Sep 17 00:00:00 2001 From:

[clang] [clang][bytecode][NFC] Switch BitcastBuffer to SmallVector (PR #114677)

2024-11-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114677 >From 9583cf5edac75e25c47f7ad2cb52a3b3bb95442b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 2 Nov 2024 16:59:41 +0100 Subject: [PATCH] [clang][bytecode][NFC] Switch BitcastBuffer to S

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

2024-10-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/113885 Reject them if the base is null, not only if the entire pointer is null. >From 66d42412ddd22e0e4da293990d16a4d7692f973c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 28 Oct 2024 10:04

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-10-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: What does "run in multiple build threads" mean? When does that happen? https://github.com/llvm/llvm-project/pull/113440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)

2024-10-23 Thread Timm Baeder via cfe-commits
@@ -133,12 +133,16 @@ void TextDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level, // diagnostics in a context that lacks language options, a source manager, or // other infrastructure necessary when emitting more rich diagnostics. if (!Info.getLocation()

[clang] [clang][bytecode] Implement __builtin_arithmetic_fence (PR #113937)

2024-10-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/113937 None >From c023a07d718013119d6e0d7a9dbcc0f01199f504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 28 Oct 2024 17:54:04 +0100 Subject: [PATCH] [clang][bytecode] Implement __builtin_ari

[clang] [clang][bytecode] Fix resource leak and use-after-free issues in CallBI function (PR #115496)

2024-11-08 Thread Timm Baeder via cfe-commits
tbaederr wrote: Please reword the title of the PR. It sounds like this commit is actually fixing anything but it just silences the static analyzer. https://github.com/llvm/llvm-project/pull/115496 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-23 Thread Timm Baeder via cfe-commits
@@ -2259,6 +2259,17 @@ QualType Sema::BuildArrayType(QualType T, ArraySizeModifier ASM, isSFINAEContext() ? diag::err_typecheck_zero_array_size : diag::ext_typecheck_zero_array_size) << 0 << ArraySize->getSourceRange(); +

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping @cor3ntin since he mentioned on Discord that he's available for reviews this week :) https://github.com/llvm/llvm-project/pull/113020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang][bytecode][NFC] Make CheckVolatile static (PR #113785)

2024-10-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/113785 None >From ff68ca5f76a9c005b6a3016c041ad8fb83f47602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 27 Oct 2024 04:09:49 +0100 Subject: [PATCH] [clang][bytecode][NFC] Make CheckVolatile

[clang] [clang][bytecode][NFC] Only do CheckConstant checks for global pointers (PR #113786)

2024-10-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/113786 We can check isStatic() early here and save ourselves some work. >From e759b44c22bcdd374550929c0c673d414f30e4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 27 Oct 2024 04:08:52 +010

[clang] [clang][bytecode][NFC] Only do CheckConstant checks for global pointers (PR #113786)

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

[clang] [clang][bytecode][NFC] Make CheckVolatile static (PR #113785)

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

[clang] [clang][bytecode] SourceInfo::Source might be null (PR #115905)

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

[clang] [Clang] enhance diagnostic message for __builtin_bit_cast size mismatch (PR #115940)

2024-11-13 Thread Timm Baeder via cfe-commits
tbaederr wrote: The changes LGTM but I'm not sure about the wording; I'd like to get some input from a native speaker. https://github.com/llvm/llvm-project/pull/115940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang][bytecode] SourceInfo::Source might be null (PR #115905)

2024-11-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/115905 This broke in 23fbaff9a3fd2b26418e0c2f10b701049399251f, but the old .dyn_cast<> handled null. >From 1040853e20625745112a1b0160c628021b62ad59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date:

[clang] [clang][bytecode] Add more checks to _ai32_* builtins (PR #114412)

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

[clang] Hexagon builtins (PR #114412)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114412 >From c6b5c084c894c97cc5003e0d2354e88cb7479bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 16:00:31 +0100 Subject: [PATCH] [clang][bytecode] Add more checks to _ai32_* bu

[clang] [clang][bytecode] Add more checks to _ai32_* builtins (PR #114412)

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

[clang] Hexagon builtins (PR #114412)

2024-10-31 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/114412 >From 8fc295989d876b32542860ca3ed73a7f8e6b42e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 14:51:52 +0100 Subject: [PAT

[clang] Hexagon builtins (PR #114412)

2024-10-31 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/114412 None >From 8fc295989d876b32542860ca3ed73a7f8e6b42e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 14:51:52 +0100 Subject

[clang] [clang][bytecode][NFC] Use const auto* for Type cast result (PR #114405)

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

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-31 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: tbaederr wrote: Just tested this on a big-endian host again, no problems found. https://github.com/llvm/llvm-project/pul

[clang] [clang][bytecode] Diagnose delete with non-virtual dtor (PR #114373)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114373 ... in the base class. >From 3c6ec4425190eea01753e7fc3a4f84d0d109f4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 08:50:32 +0100 Subject: [PATCH] [clang][bytecode] Diagn

[clang] [clang] Fix an em/email typo in Maintainers.rst (PR #114385)

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

[clang] [clang][bytecode] Start implementing __builtin_bit_cast (PR #112126)

2024-10-31 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/112126 >From 3e028394eb4f3ce9796359e3122cbc86270e43f1 Mon Sep 17 00

[clang] Hexagon builtins (PR #114412)

2024-10-31 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/114412 >From 8fc295989d876b32542860ca3ed73a7f8e6b42e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 14:51:52 +0100 Subject: [PAT

[clang] [clang][bytecode] Fix Pointer::toAPValue() for multidimensional arrays (PR #114400)

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

[clang] [clang][bytecode][NFC] Use const auto* for Type cast result (PR #114405)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114405 None >From 8fc295989d876b32542860ca3ed73a7f8e6b42e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 14:51:52 +0100 Subject: [PATCH] [clang][bytecode][NFC] Use const auto* fo

[clang] [clang][bytecode] Implement IntegralAP bitcasting (PR #114471)

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

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

2024-11-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114485 >From 7fc9c53bc169cebc02eb80775ac9515fa4dc7170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 1 Nov 2024 00:16:28 +0100 Subject: [PATCH] [clang][bytecode] Implement bitcasts to floating

[clang] [clang][bytecode] Add more checks to _ai32_* builtins (PR #114412)

2024-11-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114412 >From 879057693dcde9ae1ee97b780d7f132c221675ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 16:00:31 +0100 Subject: [PATCH] [clang][bytecode] Add more checks to _ai32_* bu

[clang] [clang][bytecode] Implement IntegralAP bitcasting (PR #114471)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114471 Only for full-byte bitwidths for now. >From 6543ec71a9e5692c1142a1a4c3da5843accee756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 23:14:41 +0100 Subject: [PATCH] [clang][

[clang] [clang][bytecode] Implement IntegralAP bitcasting (PR #114471)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114471 >From dcc03dcb4f1fed9fe871c904738a4f49c0716cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 23:14:41 +0100 Subject: [PATCH] [clang][bytecode] Implement IntegralAP bitcasti

[clang] [clang][bytecode] Diagnose negative array sizes differently (PR #114380)

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

[clang] [clang][bytecode] Diagnose negative array sizes differently (PR #114380)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114380 We have a special diagnostic ID for this. >From e172eea48fb60282ded94f7e4e61f4cf60a289ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 10:29:48 +0100 Subject: [PATCH] [cla

[clang] [clang][bytecode] Fix Pointer::toAPValue() for multidimensional arrays (PR #114400)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114400 When we see an array root, that pointer might yet again be an array element, so check for that. >From 2820aff9d4fae148d04ff6b975269df3039a92f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date

[clang] [clang][bytecode] Add more checks to _ai32_* builtins (PR #114412)

2024-11-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114412 >From cffdc2a25874c441198b07d28cff08ebde355efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 16:00:31 +0100 Subject: [PATCH] [clang][bytecode] Add more checks to _ai32_* bu

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

2024-11-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114485 >From 724a6366d9562a480c9ecbe242d4236ebcdcce45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 1 Nov 2024 00:16:28 +0100 Subject: [PATCH] [clang][bytecode] Implement bitcasts to floating

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114485 None >From ef34e3ce22103178513db8bb9565dec1511c1463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 1 Nov 2024 00:16:28 +0100 Subject: [PATCH] [clang][bytecode] Implement bitcasts to fl

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-11-12 Thread Timm Baeder via cfe-commits
tbaederr wrote: @MitalAshok Want to merge this? https://github.com/llvm/llvm-project/pull/108758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Timm Baeder via cfe-commits
@@ -96,6 +96,8 @@ def note_constexpr_pointer_constant_comparison : Note< "at runtime">; def note_constexpr_literal_comparison : Note< "comparison of addresses of literals has unspecified value">; +def note_constexpr_opaque_call_comparison : Note< + "comparison against opaq

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Timm Baeder via cfe-commits
@@ -2061,15 +2063,21 @@ static bool EvaluateIgnoredValue(EvalInfo &Info, const Expr *E) { return true; } -/// Should this call expression be treated as a no-op? -static bool IsNoOpCall(const CallExpr *E) { +/// Should this call expression be treated as forming an opaque con

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Timm Baeder via cfe-commits
@@ -2142,11 +2150,81 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [clang][bytecode] Check allocation size limit for operator new (PR #109590)

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

[clang] [clang][bytecode] Diagnose weak reads in final load (PR #109515)

2024-09-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109515 They aren't allowed here either. >From bc5bbba9c0ab2aa19172d45b2fad628ec531bb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 21 Sep 2024 08:28:52 +0200 Subject: [PATCH] [clang][bytec

[clang] [clang][bytecode] Check allocation size limit for operator new (PR #109590)

2024-09-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109590 None >From 6b37086bbaa01e9daa069771a3e54c6b80bd7e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Sep 2024 22:33:05 +0200 Subject: [PATCH] [clang][bytecode] Check allocation size l

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-21 Thread Timm Baeder via cfe-commits
tbaederr wrote: But if that was the entire problem, the one in `test/SemaCXX/` would've failed before or not? https://github.com/llvm/llvm-project/pull/108949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-20 Thread Timm Baeder via cfe-commits
@@ -10,11 +10,229 @@ using FourI128VecSize __attribute__((vector_size(64))) = __int128; using FourCharsExtVec __attribute__((ext_vector_type(4))) = char; using FourIntsExtVec __attribute__((ext_vector_type(4))) = int; +using FourLongLongsExtVec __attribute__((ext_vector_type(

[clang] [clang][bytecode] Create dummy pointers for ObjCStringLiterals (PR #109520)

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

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

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

[clang] [clang][bytecode] Don't call checkLiteralType() in visitInitializer() (PR #109530)

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

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-21 Thread Timm Baeder via cfe-commits
tbaederr wrote: Is x86-solaris11-sparcv9 the right triple to use to reproduce issues for that builder? https://github.com/llvm/llvm-project/pull/108949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-20 Thread Timm Baeder via cfe-commits
tbaederr wrote: Yeah the behavior is not the same. The original code only parsed `ident[,]` in the loop, since the `continue` ended the loop anyway. The comment above the function reads: ``` /// [ObjC] protocol-qualifiers: '<' identifier-list '>' ``` So the assumption is that this

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-20 Thread Timm Baeder via cfe-commits
tbaederr wrote: But that function _does_ have a return statement after the loop? https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix reporting non-constant variables in C (PR #109516)

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

[clang] [clang][bytecode] Create dummy pointers for ObjCStringLiterals (PR #109520)

2024-09-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109520 We need to have the final APValue point to the ObjCStringLiteral expression, not the StringLiteral itself. >From ca2960bcb2307c415547ef12fa3628aec4d4d702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4

[clang] [clang][bytecode] Fix reporting non-constant variables in C (PR #109516)

2024-09-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109516 We need to call FFDiag() to get the usual "invalid subexpression" diagnostic. >From 568f6ecc3540fca57d2a7abaae99c9f07c737714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 21 Sep 2024

[clang] [clang][bytecode] Diagnose weak reads in final load (PR #109515)

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

[clang] [clang][bytecode] Don't call checkLiteralType() in visitInitializer() (PR #109530)

2024-09-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109530 We were calling checkLiteralType() too many time and rejecting some things we shouldn't. Add The calls manually when handling MaterializeTemporaryExprs. Maybe we should call it in other places as well, but add

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: @yronglin Could you try to investigate? https://github.com/llvm/llvm-project/pull/108949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement placement-new (PR #107033)

2024-09-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/107033 >From 3dca414fecf2953393b86540df9e4d75a93c8110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Sep 2024 02:52:35 +0200 Subject: [PATCH] [clang][bytecode] Implement placement-new ---

[clang] [clang][bytecode] Implement placement-new (PR #107033)

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

[clang] [clang][bytecode] Don't call dtors of anonymous unions (PR #110087)

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

[clang] [clang][bytecode] Fix vector shifts on big-endian systems (PR #109800)

2024-09-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109800 For shifts, the LHS and RHS element types might be different. The variable naming here could probably use some love now, but I'm trying to fix this as fast as possible. See the discussion in https://github.co

[clang] [clang][bytecode] Fix vector shifts on big-endian systems (PR #109800)

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

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ok, I managed to reproduce on a s390x host https://github.com/llvm/llvm-project/pull/108949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Allow placement-new in std functions pre-C++26 (PR #109753)

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

[clang] [clang][bytecode] Allow placement-new in std functions pre-C++26 (PR #109753)

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

[clang] [clang][bytecode] Ignore CPointerToObjCPointerCasts (PR #109760)

2024-09-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109760 None >From decabdb5b12f11a72cc1d63507ced2c1e1def792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 24 Sep 2024 09:12:43 +0200 Subject: [PATCH] [clang][bytecode] Ignore CPointerToObjCPo

[clang] [clang][bytecode] Allow placement-new in std function pre-C++26 (PR #109753)

2024-09-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/109753 >From 99a3e850f943393f18405d98601a08a91065d710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Sep 2024 16:37:36 +0200 Subject: [PATCH] [clang][bytecode] Allow placement-new in std fu

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Endianness is very well possible indeed, but it's a little weird this starts failing now, since the shifts done aren't vector specific. Are you testing this on a solaris host? When you say stage2-build, you mean you're building clang main with your system compiler (this is stag

[clang] [clang][bytecode] Fix diagnosing std::construct_at with wrong type (PR #109828)

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

[clang] [clang][bytecode][NFC] Add type assertions to ArrayElem{, Pop} (PR #109829)

2024-09-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/109829 >From c73181c82f7c2568bf9d792269c3e35423ed04f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 24 Sep 2024 18:36:11 +0200 Subject: [PATCH] [clang][bytecode][NFC] Add type assertions to A

[clang] [clang][bytecode] Handle vector comma op (PR #109827)

2024-09-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: One of the test failures is related to this change. https://github.com/llvm/llvm-project/pull/109827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: For the code in question: ```c++ using FourCharsVecSize __attribute__((vector_size(4))) = char; constexpr auto s = FourCharsVecSize{6, 3, 5, 10} << 1; static_assert(s[0] == 12 && s[1] == 6 && s[2] == 10 && s[3] == 20, ""); ``` The AST is: ``` BinaryOperator 0x16251b8 'Fo

[clang] [clang][bytecode] Don't call dtors of anonymous unions (PR #110087)

2024-09-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110087 None >From d54a46d9ccc3eed3be0d319f26c49f069a68a9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 26 Sep 2024 09:41:33 +0200 Subject: [PATCH] [clang][bytecode] Don't call dtors of ano

[clang] [clang][bytecode] Add a source location to destructor calls (PR #110121)

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

[clang] [clang][bytecode] Add a source location to destructor calls (PR #110121)

2024-09-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110121 The added test case is still diagnosed differently, but I'm not sure which version is better. >From fb204d589413f0bf574ea31776a3e8df86a298e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date:

[clang] [clang][bytecode] Refuse to contruct objects with virtual bases (PR #110142)

2024-09-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110142 None >From cfbd9ae7f7d8c671ae7248cf24138d058d9143e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 26 Sep 2024 18:19:09 +0200 Subject: [PATCH] [clang][bytecode] Refuse to contruct obje

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

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

[clang] [clang][bytecode] Fix diagnosing std::construct_at with wrong type (PR #109828)

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

[clang] [clang][bytecode] Handle vector comma op (PR #109827)

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

[clang] [clang][bytecode] Refuse to contruct objects with virtual bases (PR #110142)

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

[clang] [clang][bytecode] Implement floating-to-fixed-point casts (PR #110361)

2024-09-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110361 None >From 7583fed959318e8f0e01957d7e278998510d9b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 28 Sep 2024 15:50:04 +0200 Subject: [PATCH] [clang][bytecode] Implement floating-to-f

[clang] [clang][bytecode] Implement fixed-point-to-float casts (PR #110369)

2024-09-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110369 None >From af2fe551a5324cd1274e1da8d6a14303646ae5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 28 Sep 2024 16:02:56 +0200 Subject: [PATCH] [clang][bytecode] Implement fixed-point-t

[clang] [clang][bytecode] Implement floating-to-fixed-point casts (PR #110361)

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

[clang] [clang][bytecode] Implement fixed-point-to-float casts (PR #110369)

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

[clang] [clang][bytecode] Start implementing fixed point types (PR #110216)

2024-09-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110216 Add the primitive type and implement to-bool casts. >From 7378e7ed04aa8ee853b718649b21c7b71ad07b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 27 Sep 2024 09:44:30 +0200 Subject: [P

[clang] [clang][bytecode] Implement (N)EQ between fixed point and integral (PR #110358)

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

[clang] [clang][bytecode] Start implementing fixed point types (PR #110216)

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

[clang] [clang][bytecode] Don't produce a null type when checking new exprs (PR #110252)

2024-09-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110252 getType() might give us the right type already, so use that instead of calling getPointeeType() for all CXXNewExprs. >From a40783d276cc0d0a6b6545182bb7264a7e7c4259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm

[clang] [clang][bytecode] Implement fixed point negation (PR #110237)

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

[clang] [clang][bytecode] Implement fixed point negation (PR #110237)

2024-09-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110237 None >From 232b8a42f922b1f325734cc7feadd4108c58a5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 27 Sep 2024 12:21:32 +0200 Subject: [PATCH] [clang][bytecode] Implement fixed point n

<    12   13   14   15   16   17   18   19   20   21   >