[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)

2023-10-31 Thread Timm Baeder via cfe-commits
tbaederr wrote: Bot complains about lines I haven't touched :shrug: https://github.com/llvm/llvm-project/pull/70763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use new interpreter in EvaluateAsConstantExpr if requested (PR #70763)

2023-10-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/70763 EvaluateAsConstantExpr() uses ::EvaluateInPlace() directly, which does not use the new interpreter if requested. Do it here, which is the same pattern we use in EvaluateAsInitializer. >From

[clang] Remove malformed brief commands in comments (NFC) (PR #70746)

2023-10-30 Thread Timm Baeder via cfe-commits
@@ -1291,20 +1291,20 @@ class TargetInfo : public TransferrableTargetInfo, fillValidCPUList(Values); } - /// brief Determine whether this TargetInfo supports the given CPU name. + /// Determine whether this TargetInfo supports the given CPU name. virtual bool

[clang] [Driver][BoundsSafety] Add -fbounds-safety-experimental flag (PR #70480)

2023-10-30 Thread Timm Baeder via cfe-commits
tbaederr wrote: The other experimental flags I see start with experimental, this one ends with it. Why isn't this called `-fexerimental-bounds-safety`? https://github.com/llvm/llvm-project/pull/70480 ___ cfe-commits mailing list

[clang] [clang][Interp] Fix truncateCast() (PR #69911)

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

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

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

[clang] [clang][Interp] Fix truncateCast() (PR #69911)

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

[clang] [clang][Interp] Fix IntAP(s) to IntAP(s) casts (PR #69915)

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

[clang] [clang][Interp] Fix stack peek offset for This ptr (PR #70663)

2023-10-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/70663 `Function::getArgSize()` include both the instance and the RVO pointer, so we need to subtract here. >From cc25f7ee5dba88a2e16b23d1232c4327d72d15e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?=

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

2023-10-30 Thread Timm Baeder via cfe-commits
tbaederr wrote: The `clang/Interp` parts LGTM https://github.com/llvm/llvm-project/pull/69041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle CXXTryStmts (PR #70584)

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

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

2023-10-29 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?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From b7af057b1e8cd56ce1151d6232244c137d349ea9 Mon Sep 17 00:00:00 2001 From:

[clang] [clang][Interp] Handle CXXTryStmts (PR #70584)

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

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

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

[clang] [clang][Interp] Fix variables refering to their own address (PR #70587)

2023-10-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/70587 This was a combination of issues: 1) We can subtract pointers that don't point into arrays. 2) In C, everything is possible. >From 01d5cccfc4cd3813fb57e17af3c7b395bc0c9646 Mon Sep 17 00:00:00 2001 From:

[clang] [clang][Interp] Handle CXXTryStmts (PR #70584)

2023-10-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/70584 Just do the same thing the current interpreter does: Ignore all handlerrs and visit the try block like normal. >From 0c0172a334a4484b4c1fa0d784fa7042e2fe805d Mon Sep 17 00:00:00 2001 From:

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2023-10-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69900 >From af4c29cfef620476c0d922d6ee9628f95cefc2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 19:47:33 +0200 Subject: [PATCH] [clang][Interp] IndirectMember initializers

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

2023-10-28 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?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From f1bb89bf7cfe8940726a1c51edaaf73d5bd74c4e Mon Sep 17 00:00:00 2001 From:

[clang] [clang][Interp] Implement builtin_expect (PR #69713)

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

[clang] Perf/lexer faster slow get char and size (PR #70543)

2023-10-28 Thread Timm Baeder via cfe-commits
tbaederr wrote: > Do you have benchmarks? I wonder if we should use a small struct instead of > pair, it would be slightly easier to maintain I think. Looks good otherwise. See the commit: https://github.com/llvm/llvm-project/pull/70543/commits/c9d34dae319de3eed1a23c23ff7b6d7673a04b79

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

2023-10-27 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,816 @@ +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread Timm Baeder via cfe-commits
tbaederr wrote: Sure but clang 16 will emit a warning for them: https://godbolt.org/z/jnsc4336G - are we passing `-Wno-unknown-attributes` to the build? https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits mailing list

[clang] [clang][NFC] Annotate `Type` bit-fields with `clang::preferred_type` (PR #70349)

2023-10-27 Thread Timm Baeder via cfe-commits
tbaederr wrote: Since this is done unconditionally, doesn't this mean we now need an unreleased clang to compile? Or are `[[clang::]]` attributes just ignored if they are unknown? https://github.com/llvm/llvm-project/pull/70349 ___ cfe-commits

[clang] [clang][ExprConst] Fix crash on uninitialized array subobject (PR #67817)

2023-10-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: Thanks. Don't forget to trigger a backport to clang 17 https://github.com/llvm/llvm-project/pull/67817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-26 Thread Timm Baeder via cfe-commits
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/69223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-26 Thread Timm Baeder via cfe-commits
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/69223 >From a4610e034b8331b201e282ef034e83095cbe395f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?=

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: @@ -109,6 +109,8 @@ struct Descriptor final { const bool IsTemporary = false; /// Flag indicating if the block is an array. const bool IsArray = false; + /// Flag indicating if this is a dummy descriptor. + const

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

2023-10-26 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?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 33d24cd22642d2a6f9b00aaa3826472381e93d33 Mon Sep 17 00:00:00 2001 From:

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
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/70306 >From 33d24cd22642d2a6f9b00aaa3826472381e93d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?=

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

2023-10-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69140 >From 93e7bdec10a51a6f783e51d8880b73fcc8300e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 16 Oct 2023 06:09:36 +0200 Subject: [PATCH] [clang][Interp] Correctly emit destructors for

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

2023-10-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69140 >From 8476b0b2b2666310048fe58dbd2e1ffc7a0fb21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 16 Oct 2023 06:09:36 +0200 Subject: [PATCH] [clang][Interp] Correctly emit destructors for

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

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

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-26 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/69223 >From f75f7683f59a81dba1c58a8bb9706b2c12d9a261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 16 Oct 2023

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

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

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

2023-10-26 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/70306 >From 33d24cd22642d2a6f9b00aaa3826472381e93d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -1990,6 +2011,79 @@ inline bool OffsetOf(InterpState , CodePtr OpPC, const OffsetOfExpr *E) { return true; } +inline bool Alloc(InterpState , CodePtr OpPC, const Descriptor *Desc) { + assert(Desc); + + if

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

2023-10-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/70306 >From 33d24cd22642d2a6f9b00aaa3826472381e93d33 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:

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

2023-10-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68868 >From 85f045fc4a84ef308bd7e2ca3e51889b37e48333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 12 Oct 2023 11:50:16 +0200 Subject: [PATCH] [clang][Interp] Handle unknown-size arrays

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

2023-10-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/70306 >From abc2a0b7c5beefc28e6d88f9718c5aefe1fbf044 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:

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

2023-10-26 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,91 @@ +//== DynamicAllocator.cpp - Types for the constexpr VM ---*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [Clang] Diagnose defaulted assignment operator with incompatible object parameter (PR #70176)

2023-10-26 Thread Timm Baeder via cfe-commits
@@ -7748,6 +7748,24 @@ bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, HadError = true; } } +// [C++23][dcl.fct.def.default]/p2.2 +// if F2 has an implicit object parameter of type “reference to C”, +// F1 may be an explicit

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

2023-10-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 8ec689511d266576bd792ee8731baff9ec0e7143 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

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

2023-10-26 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,91 @@ +//== DynamicAllocator.cpp - Types for the constexpr VM ---*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-10-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/70306 Implement handling for new/delete/new[]/delete[] expressions via a new `DynamicAllocator` class. This introduces four new opcodes: - `Alloc` - Allocates one element (`new int(14)`) - `AllocN` - Allocates N

[clang] [clang][Interp] Fix truncateCast() (PR #69911)

2023-10-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69911 >From 78422ff7c749a2dbfdf699d9bcc5d330c5809883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Oct 2023 11:43:32 +0200 Subject: [PATCH] [clang][Interp] Fix truncateCast() ---

[clang] [Clang] Diagnose defaulted assignment operator with incompatible object parameter (PR #70176)

2023-10-25 Thread Timm Baeder via cfe-commits
@@ -7748,6 +7748,24 @@ bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, HadError = true; } } +// [C++23][dcl.fct.def.default]/p2.2 +// if F2 has an implicit object parameter of type “reference to C”, +// F1 may be an explicit

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

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

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2023-10-24 Thread Timm Baeder via cfe-commits
@@ -389,10 +391,28 @@ template class LocalScope : public VariableScope { if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) { this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{}); this->Ctx->emitRecordDestruction(Local.Desc); +

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2023-10-24 Thread Timm Baeder via cfe-commits
@@ -816,22 +816,18 @@ bool ByteCodeExprGen::VisitArrayInitLoopExpr( const ArrayInitLoopExpr *E) { assert(Initializing); assert(!DiscardResult); + + // We visit the common opaque expression here once so we have its value + // cached. + if

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

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

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

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

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-24 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: @@ -295,7 +295,7 @@ class Pointer { bool isUnion() const; /// Checks if the storage is extern. - bool isExtern() const { return Pointee->isExtern(); } + bool isExtern() const { return Pointee &&

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-10-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69597 >From 26868de7b84d53e9399cd7420ce5496c845d8ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 18 Oct 2023 15:36:13 +0200 Subject: [PATCH] [clang][Interp] Implement inc/dec for

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-10-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69597 >From 75fd2d498ec8d4e5928619493fedbbc994501378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 18 Oct 2023 15:36:13 +0200 Subject: [PATCH] [clang][Interp] Implement inc/dec for

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-10-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69597 >From e77e43ac2a402a74fbf5c28e7dfa24d0c0e77f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 18 Oct 2023 15:36:13 +0200 Subject: [PATCH] [clang][Interp] Implement inc/dec for

[clang] [clang][Interp] Implement IntegralAP::truncate() (PR #69912)

2023-10-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69912 >From 40a32854cab91eb98aeb4788cabd4aa14d305d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Oct 2023 12:23:45 +0200 Subject: [PATCH] [clang][Interp] Implement

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

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

[clang] [clang][Interp] Fix `ArrayInitLoopExpr` handling (PR #67886)

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

[clang] [clang][Interp] Fix `ArrayInitLoopExpr` handling (PR #67886)

2023-10-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: Sorry, but I had to investigate this locally anyway because the opaque value test started to break with one of my patches from today. I came up with https://github.com/llvm/llvm-project/commit/b4fc1418d9765bfb605387efc70ecf233d27b383. Thanks for your work on this though.

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

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

[clang] [clang][Interp] Fix scalar inits of void type (PR #69868)

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

[clang] [clang][Diagnostics] Provide source range to constexpr function diags (PR #69721)

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

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

2023-10-23 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -295,7 +295,7 @@ class Pointer { bool isUnion() const; /// Checks if the storage is extern. - bool isExtern() const { return Pointee->isExtern(); } + bool isExtern() const { return Pointee && Pointee->isExtern(); }

[clang] [clang][Interp] Fix IntAP(s) to IntAP(s) casts (PR #69915)

2023-10-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: This was still `assert(false)`'ed out, it's for casts between two `IntAP`/`IntAPS` expressions. We can't just short-circuit for `FromT == ToT` because we need to consider the bitwidth when doing the cast. https://github.com/llvm/llvm-project/pull/69915

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

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

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

2023-10-23 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/67990 >From 0056d67f145fd0d5f8056325bc70246314c9b117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Oct 2023 16:26:46 +0200 Subject:

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

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

[clang] [clang][Interp] Fix `ArrayInitLoopExpr` handling (PR #67886)

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

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-10-23 Thread Timm Baeder via cfe-commits
@@ -402,6 +402,20 @@ bool Sema::DiagnoseUnexpandedParameterPack(Expr *E, if (!E->containsUnexpandedParameterPack()) return false; + // Exception: The `CollectUnexpandedParameterPacksVisitor` collects nothing + // from a FunctionParmPackExpr. In the context where the

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

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67990 >From 0056d67f145fd0d5f8056325bc70246314c9b117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Oct 2023 16:26:46 +0200 Subject: [PATCH] [clang][Interp] Only emit

[clang] [clang][Interp] Only diagnose null field access in constant contexts (PR #69223)

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

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

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

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

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

[clang] [clang][Interp] Fix IntAP(s) to IntAP(s) casts (PR #69915)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69915 None >From 4bc54275a7180d63450591616dab5660d85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Oct 2023 12:46:25 +0200 Subject: [PATCH] [clang][Interp] Fix IntAP(s) to IntAP(s)

[clang] [clang][Interp] Implement IntegralAP::truncate() (PR #69912)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69912 None >From a9e872ec17d31baad095d12a1fdca15a2a5965ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Oct 2023 12:23:45 +0200 Subject: [PATCH] [clang][Interp] Implement

[clang] [clang][Interp] Fix truncateCast() (PR #69911)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69911 The added test case used to fail because we converted the LHS to `-1`. >From 6bae86e6d728996b92b0dfbbd62c254f1f32af9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 23 Oct 2023

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69900 >From 214cb369b518adb6ef0a046731e0e16133740917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 19:47:33 +0200 Subject: [PATCH] [clang][Interp] IndirectMember initializers

[clang] [clang][Interp] IndirectMember initializers (PR #69900)

2023-10-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69900 We need to look at the chain of declarations to initialize the right field. >From 5b48d59166b013f375682eced512a4da937c458f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023

[clang] [clang][Interp] Fix scalar inits of void type (PR #69868)

2023-10-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69868 None >From 537c917cab1fe8bd8dc7dfd849bff9cd5be5efc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 22 Oct 2023 06:56:46 +0200 Subject: [PATCH] [clang][Interp] Fix scalar inits of void

[clang] [clang][Interp] Implement builtin_expect (PR #69713)

2023-10-21 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69713 >From 1d60343ec3acb89764ab56a7035e1d7355e741ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 20 Oct 2023 14:16:22 +0200 Subject:

[clang] [clang][Interp] Implement builtin_expect (PR #69713)

2023-10-21 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69713 >From 1d60343ec3acb89764ab56a7035e1d7355e741ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 20 Oct 2023 14:16:22 +0200 Subject: [PATCH] [clang][Interp] Implement builtin_expect ---

[clang] [clang][Diagnostics] Provide source range to constexpr function diags (PR #69721)

2023-10-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69721 Before: ```console ./array.cpp:290:16: error: constexpr function never produces a constant expression [-Winvalid-constexpr] 290 | constexpr void neverValid() { |^ ./array.cpp:291:3:

[clang] [clang][Interp] Implement builtin_expect (PR #69713)

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

[clang] [clang][Interp] Implement builintin_expect (PR #69713)

2023-10-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69713 >From 4d3e51337cb20c597f5cf7f8772d9a4d128eaf65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 20 Oct 2023 14:16:22 +0200 Subject: [PATCH] [clang][Interp] Implement builtin_expect ---

[clang] [clang][Interp] Implement builintin_expect (PR #69713)

2023-10-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69713 >From e369a59fca52901e255baa02458d6e53e5162d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 20 Oct 2023 14:16:22 +0200 Subject: [PATCH] [clang][Interp] Implement builintin_expect ---

[clang] [clang][Interp] Implement builintin_expect (PR #69713)

2023-10-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69713 None >From 12cb6e61a8e77a7800fda0ae4dd1148e76844da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 20 Oct 2023 14:16:22 +0200 Subject: [PATCH] [clang][Interp] Implement

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

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

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

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

[clang] [clang]improve diagnosing redefined defaulted constructor with different exception specs (PR #69688)

2023-10-20 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -fcxx-exceptions -std=c++11 %s tbaederr wrote: There's a typo in the name of this file. https://github.com/llvm/llvm-project/pull/69688 ___ cfe-commits mailing

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

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

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-20 Thread Timm Baeder via cfe-commits
tbaederr wrote: FWIW this failed for me locally as well but I'm not using `BUILD_SHARED_LIBS`. I am linking with the clang dylib though, which has the same problem I think. https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list

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

2023-10-19 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > > Ping > > Did you see [#67095 > (comment)](https://github.com/llvm/llvm-project/pull/67095#discussion_r1355468253) > ? Yes, I added the changes to `processTypeAttrs()` and added the subject list

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

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

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

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

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

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

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-10-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: This is also something that would be fixed by https://reviews.llvm.org/D154581 it seems. https://github.com/llvm/llvm-project/pull/69597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Implement inc/dec for IntegralAP (PR #69597)

2023-10-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/69597 The tests are commented out and I can't merge this yet, since it creates memory leaks when the interpretation is aborted midway through. This problem also exists with floating-point values: ```c++ constexpr

[clang] Fix __builtin_vectorelements tests with REQUIRES (PR #69582)

2023-10-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: > _a)_ Is this the correct way to do this You don't need review for this I think. I can't review this patch. If it takes a while you should rather revert your original patch. > _b)_ can I trigger the full tests before merging to main to avoid a second > set of failed

<    2   3   4   5   6   7   8   9   10   11   >