[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67778 The Expression here migth be value dependent, which makes us run into an assertion later on. Just bail out early. Fixes #67690 >From c696a6e15404235cf9cab8fc69a39e828d5da03e Mon Sep 17 00:00:00 2001 From: =?UT

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67778 >From 04abbd57c0325ea0c1d5d5af6fafa18c0c0410ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 29 Sep 2023 11:23:55 +0200 Subject: [PATCH] [clang][ExprConst] Don't try to evaluate value-d

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-09-29 Thread Timm Baeder via cfe-commits
tbaederr wrote: Should we get crash fixes like this into clang 17 as well? https://github.com/llvm/llvm-project/pull/67778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-09-29 Thread Timm Baeder via cfe-commits
@@ -177,3 +177,16 @@ namespace LambdaCallOp { p(); } } + +/// This used to crash due to an assertion failure, +/// see gh#67690 tbaederr wrote: Because it's not a RUN or expected-* line. https://github.com/llvm/llvm-project/pull/67778 __

[clang] [clang] Fix a crash from nested ArrayInitLoopExpr (PR #67722)

2023-09-29 Thread Timm Baeder via cfe-commits
@@ -352,10 +352,6 @@ namespace ZeroInit { } namespace ArrayInitLoop { - /// FIXME: The ArrayInitLoop for the decomposition initializer in g() has - /// f(n) as its CommonExpr. We need to evaluate that exactly once and not - /// N times as we do right now. t

[clang] [clang] Fix a crash from nested ArrayInitLoopExpr (PR #67722)

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/67722 ___ 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-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67814 Similarly to the code we already had for builtin functions, we need to check the call expression for the arguments passed. >From 0628b5c9cdfb712936e47bbac278bc579c253d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q

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

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67814 >From 64aae1cdf960f3edb34f1cf82ae3e66eb692247a 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 Simil

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

2023-09-29 Thread Timm Baeder via cfe-commits
tbaederr wrote: Unfortunate, but the changes look good to me. Since the crash was introduced in clang 17, this should also be backported. https://github.com/llvm/llvm-project/pull/67817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][Interp] Handle delegating constructors (PR #67823)

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67823 None >From d858d4b61c6d0e469debb9c8b865b4b5d4c7244b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 29 Sep 2023 18:00:08 +0200 Subject: [PATCH] [clang][Interp] Handle delegating construc

[clang] [clang][Interp] Handle delegating constructors (PR #67823)

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67823 >From 5e37e30bc9200f71a4ac2a8111a7e6d54d381b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 29 Sep 2023 18:00:08 +0200 Subject: [PATCH] [clang][Interp] Handle delegating constructors

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-09-29 Thread Timm Baeder via cfe-commits
@@ -31,6 +31,33 @@ static_assert(b, ""); constexpr int one = true; static_assert(one == 1, ""); +constexpr bool b2 = bool(); +static_assert(!b2, ""); + +namespace ScalarTypes { + constexpr int ScalarInitInt = int(); + static_assert(ScalarInitInt == 0, ""); + constexpr float

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

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

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67229 >From c3fcded8f926789ee6b00dcb676231b3c8285ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 23 Sep 2023 11:41:52 +0200 Subject: [PATCH] [clang][Interp] Fix returning nullptr from funct

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

2023-09-30 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/67814 >From 64aae1cdf960f3edb34f1cf82ae3e66eb692247a 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: [PATC

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

2023-09-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67814 >From 64aae1cdf960f3edb34f1cf82ae3e66eb692247a 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 Simil

[clang] [clang][Interp] Add IntegralAP for arbitrary-precision integers (PR #65844)

2023-09-30 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/65844 ___ cfe-commits mai

[clang] [clang][Interp] Add IntegralAP for arbitrary-precision integers (PR #65844)

2023-10-01 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: @@ -26,6 +28,66 @@ static_assert(number != 10, ""); // expected-error{{failed}} \ // expected-n

[clang] [clang][Interp] Implement __builtin_popcount() (PR #67929)

2023-10-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67929 None >From ce44117306858aa1bff3766dc640201ffd99a89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 1 Oct 2023 19:41:15 +0200 Subject: [PATCH] [clang][Interp] Implement __builtin_popcoun

[clang] [clang][Interp] Add IntegralAP for arbitrary-precision integers (PR #65844)

2023-10-01 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: I pushed a fix that hopefully works, let me know if it doesn't. https://github.com/llvm/llvm-project/pul

[clang] [clang][Interp] Implement IntegralAP::comp (PR #67954)

2023-10-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67954 None >From fe7f8cddb7f4590f481fce3b99c7b56f8163d889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 1 Oct 2023 19:57:03 +0200 Subject: [PATCH] [clang][Interp] Implement IntegralAP::comp

[clang] [clang][Interp] Implement IntegralAP::comp (PR #67954)

2023-10-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67954 >From 80bd890c332654458014c4acc20709b9cbb6eb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 1 Oct 2023 19:57:03 +0200 Subject: [PATCH] [clang][Interp] Implement IntegralAP::comp ---

[clang] [clang][Interp] Fix value truncation when casting int128 to smaller size (PR #67961)

2023-10-02 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/67961 Before this patch, we would run into an assertion in `APInt::get{S,Z}ExtValue()` because the `AllOnes` value had more than 64 active bits. >From 80bd890c33265

[clang] [clang][Interp] Fix value truncation when casting int128 to smaller size (PR #67961)

2023-10-02 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/67961 >From 80bd890c332654458014c4acc20709b9cbb6eb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 1 Oct 2023 19:57:03 +0200 Subject: [PATCH

[clang] [clang][Interp] Implement compound assign operators on bitfields (PR #67306)

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

[clang] [clang][Interp] Diagnose uninitialized bases (PR #67131)

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

[clang] [clang][Interp] Add IntegralAP for arbitrary-precision integers (PR #65844)

2023-10-02 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: Sigh, will push a fix as soon as my local build is done. https://github.com/llvm/llvm-project/pull/65844

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

2023-10-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67990 This is also what the current interpreter does. No test for now since the only reproducer I have is from https://reviews.llvm.org/D156565 and doesn't work without that patch. >From 5e43ab378e64ea8a852f8bf5571d

[clang] [clang][Interp] Fix value truncation when casting int128 to smaller size (PR #67961)

2023-10-02 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/67961 >From 80bd890c332654458014c4acc20709b9cbb6eb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 1 Oct 2023 19:57:03 +0200 Subject: [PATCH

[clang] [clang][Interp] Implement __builtin_popcount() (PR #67929)

2023-10-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67929 >From a3633c87cd53ee1d092a68e21d9dd41945a848d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 1 Oct 2023 19:41:15 +0200 Subject: [PATCH] [clang][Interp] Implement __builtin_popcount() -

[clang] [clang][Interp] Fix value truncation when casting int128 to smaller size (PR #67961)

2023-10-02 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/67961 >From d7ee51b3736ee65279f07bb0f4d5ccc31911cfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 1 Oct 2023 19:57:03 +0200 Subject: [PATCH

[clang] [clang][Interp] Implement __builtin_popcount() (PR #67929)

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

[clang] [clang][Interp] Implement IntegralAP::comp (PR #67954)

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

[clang] [clang][Interp] Fix value truncation when casting int128 to smaller size (PR #67961)

2023-10-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67961 >From 377e0b069ff0d68ff4a4cdd690b62e555bdf8d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 2 Oct 2023 10:46:22 +0200 Subject: [PATCH] [clang][Interp] Fix value truncation when casting

[clang] [clang][Interp] Fix value truncation when casting int128 to smaller size (PR #67961)

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

[clang] [clang] Ignore GCC 11 `[[malloc(x)]]` attribute (PR #68059)

2023-10-02 Thread Timm Baeder via cfe-commits
@@ -4122,6 +4122,9 @@ def RestrictDocs : Documentation { The ``malloc`` attribute indicates that the function acts like a system memory allocation function, returning a pointer to allocated storage disjoint from the storage for any other object accessible to the caller. + +The

[clang] [clang][Interp] Diagnose uninitialized bases (PR #67131)

2023-10-02 Thread Timm Baeder via cfe-commits
tbaederr wrote: > Maybe we should change the existing evaluator to be consistent? Otherwise LGTM I'm not 100% sure what output is better, but we can change that later. This change is more about correctness. https://github.com/llvm/llvm-project/pull/67131 ___

[clang] [clang][Interp] Diagnose uninitialized bases (PR #67131)

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

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68069 Make sure we pass the expected bitwidth around when casting to IntAP/IntAPS and move the tests to their own file. This makes it easier to test the `IntegralAP` code for different bit widths than 128. >From d7

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-02 Thread Timm Baeder via cfe-commits
@@ -1601,6 +1617,46 @@ bool CastFloatingIntegral(InterpState &S, CodePtr OpPC) { } } +static inline bool CastFloatingIntegralAP(InterpState &S, CodePtr OpPC, + uint32_t BitWidth) { + const Floating &F = S.Stk.pop(); + + APSInt Resul

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-02 Thread Timm Baeder via cfe-commits
@@ -582,11 +598,21 @@ def CastIntegralFloating : Opcode { // Cast a floating to an integer type def CastFloatingIntegral : Opcode { - let Types = [AluTypeClass]; + let Types = [FixedSizeIntegralTypes]; tbaederr wrote: The type classes for these get kinda co

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

2023-10-02 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/67095 ___ 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-02 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?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://g

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-10-03 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/67778 >From 1b6fcc49f5ef9b99b4b2f7019de6d8d24a03f232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject: [PATCH

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

2023-10-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68081 Not adding any tests since I'm waiting for https://github.com/llvm/llvm-project/pull/68069/ >From dabd2ea3311929d446499e94fc2647e18183ea8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue

[clang] [Clang] Fix constant evaluating a captured variable in a lambda (PR #68090)

2023-10-03 Thread Timm Baeder via cfe-commits
@@ -8366,8 +8366,14 @@ bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) { return false; if (auto *FD = Info.CurrentCall->LambdaCaptureFields.lookup(VD)) { + auto *MD = cast(Info.CurrentCall->Callee); // Start with 'Result' referri

[clang] [Clang] Fix constant evaluating a captured variable in a lambda (PR #68090)

2023-10-03 Thread Timm Baeder via cfe-commits
@@ -8366,8 +8366,14 @@ bool LValueExprEvaluator::VisitVarDecl(const Expr *E, const VarDecl *VD) { return false; if (auto *FD = Info.CurrentCall->LambdaCaptureFields.lookup(VD)) { + auto *MD = cast(Info.CurrentCall->Callee); // Start with 'Result' referri

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-10-03 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/67778 >From 1b6fcc49f5ef9b99b4b2f7019de6d8d24a03f232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject: [PATCH

[clang] [clang][Interp] Emit dummy values for unknown C variables (PR #66749)

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

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

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

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-10-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67778 >From 55a0f4abbb9ad9270aa18e2eec08b4a0bfb4dae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 29 Sep 2023 11:23:55 +0200 Subject: [PATCH] [clang][ExprConst] Don't try to evaluate value-d

[clang] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

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

[clang] [Sema] Add check for bitfield assignments to larger integral types (PR #68276)

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

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

2023-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68288 >From https://reviews.llvm.org/D154951 - which is never gonna make it out of >Phabricator anyway. The tests are failing because https://reviews.llvm.org/D154581 is not pushed. Aaron's review mentioned that we

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

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

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

2023-10-05 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/68288 >From e208c2fc7932d80d441d90bfa0fd949b8910a4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 11 Jul 2023 13:45:04 +0200 Subject: [PATC

[clang] [clang][Diagnostics] Add bitfield source range to zero width diags (PR #68312)

2023-10-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68312 Before: ``` array.cpp:157:8: error: named bit-field 'a' has zero width 157 | char a : 12 - 12; |^ 1 error generated. ``` After: ``` array.cpp:157:8: error: named bit-field 'a' has zero width

[clang] [clang][NFC] Refactor Builtins.def to be a tablegen file (PR #68324)

2023-10-05 Thread Timm Baeder via cfe-commits
@@ -172,6 +173,8 @@ cl::opt Action( "Generate clang attribute text node dumper"), clEnumValN(GenClangAttrNodeTraverse, "gen-clang-attr-node-traverse", "Generate clang attribute traverser"), +clEnumValN(GenClangBuiltins, "gen

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

2023-10-05 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?= Message-ID: In-Reply-To: tbaederr wrote: > Also, redirecting output to a file doesn't always di

[clang] [clang][Diagnostics] Add bitfield source range to zero width diags (PR #68312)

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

[clang] [clang][Sema] Only check RVV types if we have them (PR #67669)

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

[clang] [clang][Sema] Only check RVV types if we have them (PR #67669)

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

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: Well, this is not going to make a noticeable difference in runtime. https://reviews.llvm.org/D155548 didn't land because there are no measurements to make where this makes a measurable difference. As for my earlier comment, it would also make sense to rename that function to `

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: > > Well, this is not going to make a noticeable difference in runtime. > > https://reviews.llvm.org/D155548 didn't land because there are no > > measurements to make where this makes a measurable difference. > > Those changes didn't land because no measurements were attempted.

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: http://llvm-compile-time-tracker.com/index.php?config=NewPM-O3&stat=instructions%3Au&remote=tbaederr https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: ^ Removing integer and boolean expressions seems to have some negative impact though. https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

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

2023-10-06 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?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://gi

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

2023-10-06 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?= Message-ID: In-Reply-To: https://github.com/tbaederr converted_to_draft

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

2023-10-06 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?= Message-ID: In-Reply-To: tbaederr wrote: The latest commit keeps a list

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

2023-10-06 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?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://gi

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

2023-10-07 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?= Message-ID: In-Reply-To: tbaederr wrote: Preliminary results show a sli

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

2023-10-07 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?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://gi

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

2023-10-07 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?= Message-ID: In-Reply-To: https://github.com/tba

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

2023-10-07 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?= Message-ID: In-Reply-To: @@ -8

[clang] [clang][Interp] Emit dummy values for unknown C variables (PR #66749)

2023-10-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66749 >From 1d36bdbd1e876adb5c39cf8e06c8387d5de1ab71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 19 Sep 2023 08:47:01 +0200 Subject: [PATCH] [clang][Interp] Emit dummy values for unknown C

[clang] [clang][Interp] Emit dummy values for unknown C variables (PR #66749)

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

[clang] [clang][Interp] Handle delegating constructors (PR #67823)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67823 ___ 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-09 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] Fix returning nullptr from functions (PR #67229)

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

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/67147 ___ 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-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > > This was much easier than expected actually. > > Making it a `DeclOrType` attribute is indeed a nice idea, this would allow > existing attributes to stay where they are. Is it still inheritable, i.e. > does it also apply to

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67147 >From 54840541b94b5ccc02c1c563678991ea230acbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 22 Sep 2023 16:27:11 +0200 Subject: [PATCH] [clang][Interp] Handle CXXScalarValueInitExprs

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67229 >From 32d5ecddc5b6aff0924b48a0b35128be7b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 23 Sep 2023 11:41:52 +0200 Subject: [PATCH] [clang][Interp] Fix returning nullptr from funct

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

2023-10-10 Thread Timm Baeder via cfe-commits
tbaederr wrote: Yeah sorry for the unnecessary ping :) I'll push as soon as the CI is done. https://github.com/llvm/llvm-project/pull/67229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang][Interp] Fix returning nullptr from functions (PR #67229)

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

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67147 >From 367cf9517a425d410c120ce7bd201988e3075ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 22 Sep 2023 16:27:11 +0200 Subject: [PATCH] [clang][Interp] Handle CXXScalarValueInitExprs

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/68679 We do a similar things a few lines above for `Index`: ``` // Get a version of the index comparable to the type. T Index = T::from(Ptr.getIndex(), Offset.bitWidth()); ``` >From 10d205da4c220227589ce210bf921f

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/68679 ___ 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-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -8141,6 +8141,16 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D, if (!AL.checkAtLeastNumArgs(S, 1)) return; + // We allow this on function declaration as well as + // variable declarations of function

[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)

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

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68069 >From c93895b7e1b0727327178d73adc93cb988ad3966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject: [PATCH] [clang][Interp] Add basic support for _BitInt Ma

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68069 >From ae2201c2bb82ae26030800c62b3a0f93e2ec49a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject: [PATCH] [clang][Interp] Add basic support for _BitInt Ma

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

2023-10-10 Thread Timm Baeder via cfe-commits
tbaederr wrote: I've merged https://reviews.llvm.org/D155548, so closing this. https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid evaluating the BitWidth expression over and over again (PR #66203)

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

[clang] [clang][Interp] Implement compound assign operators on bitfields (PR #67306)

2023-10-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67306 >From d275b2de769bbae45c87c9ae7e04d744b4849c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 25 Sep 2023 11:39:02 +0200 Subject: [PATCH] [clang][Interp] Implement compound assign operat

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68069 >From ae2201c2bb82ae26030800c62b3a0f93e2ec49a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 08:35:57 +0200 Subject: [PATCH

[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)

2023-10-10 Thread Timm Baeder via cfe-commits
@@ -1437,7 +1437,7 @@ bool OffsetHelper(InterpState &S, CodePtr OpPC, const T &Offset, return false; }; - unsigned MaxOffset = MaxIndex - Ptr.getIndex(); + T MaxOffset = T::from(MaxIndex - Ptr.getIndex(), Offset.bitWidth()); tbaederr wrote: Dunno, We

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/68069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

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

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

2023-10-11 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping 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

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