[clang] [clang][NFC] Add documentation for `CastExpr::path()`. (PR #85623)

2024-03-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: > I've moved the documentation down, right above the declaration of `path()`. > WDYT? I think that should work. https://github.com/llvm/llvm-project/pull/85623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang] Fix assertion failure when printing atomic apvalues (PR #85259)

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

[clang] [clang][Interp] Merge ByteCodeExprGen and ByteCodeStmtGen (PR #83683)

2024-03-24 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?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/83683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

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

2024-03-24 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: Ping https://github.com/llvm/llvm-project/pull/84159 ___ cfe

[clang] [clang] Fix assertion failure when printing atomic apvalues (PR #85259)

2024-03-26 Thread Timm Baeder via cfe-commits
tbaederr wrote: Right, I was just hoping for an existing unittest for `APValue`. https://github.com/llvm/llvm-project/pull/85259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix assertion failure when printing atomic apvalues (PR #85259)

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

[clang] Add missing declarations of explicit template instantiations. (PR #86964)

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

[clang] [clang][Interp] Bail out on missing ComparisonCategoryInfo (PR #80131)

2024-02-06 Thread Timm Baeder via cfe-commits
@@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -fexperimental-new-constant-interpreter -verify tbaederr wrote: The AST we trip up on is ``` BinaryOperator 0x5216ed08 'struct S' '=' |-DeclRefExpr 0x5216eb

[clang] [clang][Interp] Bail out on missing ComparisonCategoryInfo (PR #80131)

2024-02-06 Thread Timm Baeder via cfe-commits
@@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only %s -verify +// RUN: %clang_cc1 -fsyntax-only %s -fexperimental-new-constant-interpreter -verify tbaederr wrote: Yes, what I mean is, the constant interpreter should return `false` for this assignment in C. http

[clang] [clang][Interp] Bail out on missing ComparisonCategoryInfo (PR #80131)

2024-02-06 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/80131 >From 3548cdb9907a44c25da61887b2f8e83268e3c2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 31 Jan 2024 12:53:39 +0100 Subject: [PATC

[clang] [clang][Interp] Bail out on missing ComparisonCategoryInfo (PR #80131)

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

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-09 Thread Timm Baeder via cfe-commits
@@ -2187,6 +2188,12 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, } } + // Number of digits in a group between separators + int Grouping = 4; tbaederr wrote: ```suggestion unsigned Grouping = (Radix == 8 || Radix == 10)

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-09 Thread Timm Baeder via cfe-commits
@@ -2187,6 +2188,12 @@ void APInt::toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, } } + // Number of digits in a group between separators tbaederr wrote: ```suggestion // Number of digits in a group between separators. ``` https://gith

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-09 Thread Timm Baeder via cfe-commits
@@ -2774,7 +2774,8 @@ static bool CheckedIntArithmetic(EvalInfo &Info, const Expr *E, if (Info.checkingForUndefinedBehavior()) Info.Ctx.getDiagnostics().Report(E->getExprLoc(), diag::warn_integer_constant_overflow) - <<

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Timm Baeder via cfe-commits
@@ -14040,6 +14040,8 @@ class Sema final { bool SemaValueIsRunOfOnes(CallExpr *TheCall, unsigned ArgNum); public: + bool SemaIsLayoutCompatible(QualType T1, QualType T2); tbaederr wrote: Can this function no be `const`? And I guess the "Sema" prefix is to

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

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

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-12 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/79452 >From 9234c4224e02e5170d81aeb5fb2bfa9fe7a26eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 25 Jan 2024 15:20:52 +0100 Subject: [PATCH] [clang][Interp] Handle complex values in visitBo

[clang] [clang][Interp] Emit const references for Float arguments (PR #79753)

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

[clang] bad error message on incorrect string literal #18079 (PR #81670)

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

[clang] [clang][Sema] Warn on self move for inlined static cast (PR #76646)

2024-03-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. Much better, thanks. https://github.com/llvm/llvm-project/pull/76646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/84159 This turns the current `Pointer` class into a discriminated union of `BlockPointer` and `IntPointer`. The former is what `Pointer` currently is while the latter is just an integer value and an optional `Descrip

[clang] [clang][Interp] Merge ByteCodeExprGen and ByteCodeStmtGen (PR #83683)

2024-03-06 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: > How ugly does CRTP get though? Looks like this: https://github.com/tbaederr/llvm-project/commit/ae37a17e30978cbe8e42799d26308b2e4e7b0115 Not really a big fan. But I'm now stuck with ``` mold: error

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

2024-03-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: FWIW I've been tracking test failures by enabling the new interpreter by default and running `ninja check-clang-{ast,sema,semacxx,codegen}` at https://tbaederr.github.io/stats/. With this patch, we're down from 281 to 262 (with only one new failure, `Sema/callingconv-cast.c`).

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

2024-03-06 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/84159 >From 5eacd7478d3db7472d5ab983468a441b1f61ad7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 6 Mar 2024 08:36:52 +0100 Subject: [PATCH

[clang] [clang][Sema] Warn on self move for inlined static cast (PR #76646)

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

[clang] [clang][ExprConst] Can't be past an invalid LValue designator (PR #84293)

2024-03-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/84293 For the test case in C, both `LV.getLValueOffset()` and `Ctx.getTypeSizeInChars(Ty)` are zero, so we return `true` from `isOnePastTheEndOfCompleteObject()` and ultimately diagnose this as being one past the en

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

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

[clang] [clang][ExprConst] Can't be past an invalid LValue designator (PR #84293)

2024-03-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/84293 >From 8dda4c1d6186c8d0ecd6b233f1bd636133056f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 7 Mar 2024 10:14:03 +0100 Subject: [PATCH] [clang][ExprConst] Can't be past an invalid LValu

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

2024-03-07 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: @@ -123,8 +167,9 @@ APValue Pointer::toAPValue() const { Path.push_back(APValue::LValuePathEntry({BaseOrMember, IsVirtual})); Ptr = Ptr.getBase(); continue; + +llvm_unreachable("Invalid fiel

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

2024-03-07 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -28,11 +28,26 @@ class Block; class DeadBlock; class Pointer; class Context; +template class Integral; enum PrimType : unsigned; class Pointer; inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Pointer

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

2024-03-07 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/84159 >From 5eacd7478d3db7472d5ab983468a441b1f61ad7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 6 Mar 2024 08:36

[clang] [clang][test] Fix constant __builtin_popcountg test requiring __int128 (PR #84412)

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

[clang] [clang][Interp] Implement __builtin_popcountg (PR #84500)

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

[clang] [clang][Interp] Implement __builtin_popcountg (PR #84500)

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

[clang] [clang][Interp] Merge ByteCodeExprGen and ByteCodeStmtGen (PR #83683)

2024-03-12 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/83683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

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

2024-03-12 Thread Timm Baeder via cfe-commits
tbaederr wrote: There are two questions above about removing a diagnostic that you haven't answered yet https://github.com/llvm/llvm-project/pull/70307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang][Sema] Warn on self move for inlined static cast (PR #76646)

2024-02-29 Thread Timm Baeder via cfe-commits
@@ -18843,17 +18843,26 @@ void Sema::DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, LHSExpr = LHSExpr->IgnoreParenImpCasts(); RHSExpr = RHSExpr->IgnoreParenImpCasts(); - // Check for a call expression + // Check for a call expression or static_cast expressio

[clang] Fix implementation of [temp.param]p14's first sentence. (PR #83487)

2024-03-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/83487 >From 1c443bec9f11c14f8971d5dcb03d12e50c080afc Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 29 Feb 2024 13:29:02 -0800 Subject: [PATCH 1/3] Fix implementation of [temp.param]p14's first sentence. The fi

[clang] Fix implementation of [temp.param]p14's first sentence. (PR #83487)

2024-03-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/83487 >From 1c443bec9f11c14f8971d5dcb03d12e50c080afc Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 29 Feb 2024 13:29:02 -0800 Subject: [PATCH 1/3] Fix implementation of [temp.param]p14's first sentence. The fi

[clang] [clang] Bugfix for choosing the more specialized overload (PR #83279)

2024-03-01 Thread Timm Baeder via cfe-commits
Botond =?utf-8?q?István_Horváth?=,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath ,Botond Istvan Horvath Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/83279 >From 68200ecf3267d1b3940fa73c25c50ee706932a98 Mon Sep

[clang] [clang][Interp] Merge ByteCodeExprGen and ByteCodeStmtGen (PR #83683)

2024-03-04 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: > So ByteCodeExprGen can definitely visit statements and expressions. Well yes, the possibility is there, but it doesn't implement any of the functionality when visiting statements. :) > Can't ByteCode

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

2024-01-30 Thread Timm Baeder via cfe-commits
tbaederr wrote: Here's gnome-terminal's default colors, first normal and then bright: ![Screenshot from 2024-01-30 14-55-37](https://github.com/llvm/llvm-project/assets/49720664/9f225494-0cc9-4d53-a0e1-98b45b5b4c4b) Here the same with xterm: ![Screenshot from 2024-01-30 14-58-24](https://githu

[clang] [clang][Interp] Support arbitrary precision constants (PR #79747)

2024-01-30 Thread Timm Baeder via cfe-commits
@@ -228,6 +229,42 @@ void emit(Program &P, std::vector &Code, const Floating &Val, Val.serialize(Code.data() + ValPos); } +template <> +void emit(Program &P, std::vector &Code, + const IntegralAP &Val, bool &Success) { + size_t Size = Val.bytesToSerialize(); + +

[clang] [clang][Interp] Support arbitrary precision constants (PR #79747)

2024-01-30 Thread Timm Baeder via cfe-commits
@@ -228,6 +229,42 @@ void emit(Program &P, std::vector &Code, const Floating &Val, Val.serialize(Code.data() + ValPos); } +template <> +void emit(Program &P, std::vector &Code, + const IntegralAP &Val, bool &Success) { + size_t Size = Val.bytesToSerialize(); + +

[llvm] [clang] [clang][Interp] Support arbitrary precision constants (PR #79747)

2024-01-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/79747 >From c9f1518241b27978c40b7a5fc52f2c5ad9d32604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 30 Jan 2024 15:57:07 +0100 Subject: [PATC

[clang] [clang][Interp] Support arbitrary precision constants (PR #79747)

2024-01-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/79747 >From 13b8fa29188bcf1f2122fb8a0708ecc468b8e097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 28 Jan 2024 09:48:15 +0100 Subject: [PATCH] [clang][Interp] Support arbitrary precision cons

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-01-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/80023 Fixes #79964 >From 77c9461b321fa82c82e3e4a1e29c825b912c8ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 30 Jan 2024 17:04:23 +0100 Subject: [PATCH] [clang] Fix a possible out-of-boun

[clang] [clang][Interp] Support arbitrary precision constants (PR #79747)

2024-01-30 Thread Timm Baeder via cfe-commits
@@ -228,6 +229,42 @@ void emit(Program &P, std::vector &Code, const Floating &Val, Val.serialize(Code.data() + ValPos); } +template <> +void emit(Program &P, std::vector &Code, + const IntegralAP &Val, bool &Success) { + size_t Size = Val.bytesToSerialize(); + +

[clang] [clang][Interp] Support arbitrary precision constants (PR #79747)

2024-01-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/79747 >From c45c1c9bbd944744f69e811b2104de01cf82c55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 28 Jan 2024 09:48:15 +0100 Subject: [PATC

[clang] [clang][Interp] Support arbitrary precision constants (PR #79747)

2024-01-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/79747 >From c45c1c9bbd944744f69e811b2104de01cf82c55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 28 Jan 2024 09:48:15 +0100 Subject: [PATC

[clang] [clang][Interp] Add inline descriptor to global variables (PR #72892)

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

[clang] [clang][NFC] Move isSimpleTypeSpecifier() from Sema to Token (PR #80101)

2024-01-30 Thread Timm Baeder via cfe-commits
@@ -13,6 +13,7 @@ #ifndef LLVM_CLANG_LEX_TOKEN_H #define LLVM_CLANG_LEX_TOKEN_H +#include "clang/Basic/LangOptions.h" tbaederr wrote: I think we can get by with a forward-declaration of `LangOptions` instead of the include here? https://github.com/llvm/llvm

[clang] [clang][Interp] Handle imaginary literals (PR #79130)

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

[clang] [clang][Interp] Handle casts between complex types (PR #79269)

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

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/79452 >From d4364d84bff990a241904cdf6644afac9b304923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 25 Jan 2024 15:20:52 +0100 Subject: [PATCH] [clang][Interp] Handle complex values in visitBo

[clang] [clang][Interp] Support arbitrary precision constants (PR #79747)

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

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

2024-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70772 >From 8449070d0cec2ad120c9d8a36a72594d595b7fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 31 Oct 2023 07:17:16 +0100 Subject: [PATCH] [clang][Interp] Handle std::move etc. builtins

[clang] [clang][Interp] Bail out on missing ComparisonCategoryInfo (PR #80131)

2024-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/80131 Instead of asserting. This can happen in real-world code. >From 3548cdb9907a44c25da61887b2f8e83268e3c2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 31 Jan 2024 12:53:39 +0100 Subjec

[clang] [clang][Interp] Handle std::move etc. builtins (PR #70772)

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

[clang] [clang][Interp] Handle imaginary literals (PR #79130)

2024-01-31 Thread Timm Baeder via cfe-commits
@@ -112,11 +112,13 @@ bool Context::evaluateAsInitializer(State &Parent, const VarDecl *VD, #endif // Ensure global variables are fully initialized. - if (shouldBeGloballyIndexed(VD) && !Res.isInvalid() && - (VD->getType()->isRecordType() || VD->getType()->isArrayType

[clang] [clang][Interp] Handle casts between complex types (PR #79269)

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

[clang] [clang][Interp] Handle imaginary literals (PR #79130)

2024-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/79130 >From db25ed3917079ea9bf3c05a899b40415e3c5df8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 23 Jan 2024 09:14:02 +0100 Subject: [PATCH] [clang][Interp] Handle imaginary literals Initi

[clang] [clang][Interp] Handle imaginary literals (PR #79130)

2024-01-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/79130 ___ 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)

2024-02-01 Thread Timm Baeder via cfe-commits
tbaederr wrote: Looks a lot like the stack trace mentioned in https://github.com/llvm/llvm-project/issues/80127 https://github.com/llvm/llvm-project/pull/66514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

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

2024-02-01 Thread Timm Baeder via cfe-commits
tbaederr wrote: You can diasable it via `-fno-color-diagnostics`. https://github.com/llvm/llvm-project/pull/66514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-01 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/80023 >From 58ceefe09cd992c3692bb3af7c2807ac8949ba67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 1 Feb 2024 09:11:27 +0100 Subject: [PATCH

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

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

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-01 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/80023 ___ 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)

2024-02-01 Thread Timm Baeder via cfe-commits
tbaederr wrote: I will also merge https://github.com/llvm/llvm-project/pull/80023 once the CI is green. That will fix one potential source of problems. https://github.com/llvm/llvm-project/pull/66514 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-01 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -109,6 +109,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, bool VisitCXXScalarValueInitExpr(const CXXScalarValueInitExpr *E); bool VisitSizeOfPackExpr(const SizeOfPackExpr *E); bool VisitGenericSelection

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80023 >From 046ac37551071c226ce155d25241d6676133d208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 30 Jan 2024 17:04:23 +0100 Subject: [PATCH] [clang] Fix a possible out-of-bounds read Fixes

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-02 Thread Timm Baeder via cfe-commits
@@ -1251,7 +1251,7 @@ highlightLines(StringRef FileData, unsigned StartLineNumber, unsigned LineLength = 0; for (unsigned I = 0; I <= Spelling.size(); ++I) { // This line is done. - if (isVerticalWhitespace(Spelling[I]) || I == Spelling.size()) { + if (

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80023 >From 675a369815ab8b328f7ec67732e34d67b342377c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 30 Jan 2024 17:04:23 +0100 Subject: [PATCH] [clang] Fix a possible out-of-bounds read Fixes

[clang] [clang] Fix a possible out-of-bounds read (PR #80023)

2024-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/80023 ___ 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)

2024-02-02 Thread Timm Baeder via cfe-commits
tbaederr wrote: > This I think qualifies as a serious problem as it introduces a crash which > may occur in _any_ existent codebase. Anyone using the compiler at trunk and > encountering the crash has no way to know how to deal with it. Since we don't have a reproducer, the danger is that we r

[clang] [clang][Interp] Fix MemberExpr initializing an existing value (PR #79973)

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

[clang] [clang][Interp] Support zero init for complex types (PR #79728)

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

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/80662 First, we need to register local constant variables in C, so we get the same diagnostic behavior as the current interpeter. Second, when returning an LValue (as a Pointer), which we eventually convert to an RV

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
tbaederr wrote: Asking for review here since I'm not sure if the reasoning makes sense for other people. https://github.com/llvm/llvm-project/pull/80662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang][Interp] Support zero init for complex types (PR #79728)

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

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo &Info) { template <> bool EvalEmitter::emitRet(const SourceInfo &Info) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer &Ptr = S.Stk.pop(); + // Implicitl

[clang] [clang][Interp] Emit const references for Float arguments (PR #79753)

2024-02-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/79753 >From 0e108e92b3165f95a934895e14f6c330f6c5e3fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 28 Jan 2024 16:13:08 +0100 Subject: [PATCH] [clang][Interp] Emit const references for Float

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo &Info) { template <> bool EvalEmitter::emitRet(const SourceInfo &Info) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer &Ptr = S.Stk.pop(); + // Implicitl

[clang] [clang][Interp] Fix MemberExpr initializing an existing value (PR #79973)

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

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80662 >From 91c130565aca5e915140aacf3ffca5c59b689523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 5 Feb 2024 10:29:45 +0100 Subject: [PATCH] [clang][Interp] Do r-to-l conversion immediately

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
@@ -119,12 +121,26 @@ template bool EvalEmitter::emitRet(const SourceInfo &Info) { template <> bool EvalEmitter::emitRet(const SourceInfo &Info) { if (!isActive()) return true; - EvalResult.setPointer(S.Stk.pop()); + + const Pointer &Ptr = S.Stk.pop(); + // Implicitl

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80662 >From bd8e8351850d843a64da05964f817b918c1ebd59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 5 Feb 2024 10:29:45 +0100 Subject: [PATCH] [clang][Interp] Do r-to-l conversion immediately

[clang] [clang][Interp] Bail out on missing ComparisonCategoryInfo (PR #80131)

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

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-02-06 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/79452 >From a0727e28e16a051bce8b1b2dd8f5ace6b2b54394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 6 Feb 2024 10:03:15 +0100 Subject: [PATCH

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

2024-02-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?= Message-ID: In-Reply-To: @@ -8938,6 +8957,11 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, attr.setUsedAsTypeAttr();

[clang] [clang][Interp] Handle casts between complex types (PR #79269)

2024-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/79269 Just handle this like two primtive casts. >From ecc963e4fbcfe1cd1c1f40c642c1c0fbf916a8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 24 Jan 2024 10:04:50 +0100 Subject: [PATCH] [clan

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

2024-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From 69aa9b23a7d5afb58b89a703e7755924561dd54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATCH] [clang][Diagnostics] Highlight code snippets Ad

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

2024-01-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); +r

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

2024-01-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); +r

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

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -368,6 +369,7 @@ template class LocalScope : public VariableScope { return; this->emitDestructors(); this->Ctx->emitDestroy(*Idx, SourceInfo{}); +removeStoredOpaqueValues(); tbaederr wrote: Inline this function here. https://github.com/

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

2024-01-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); +r

[llvm] [clang-tools-extra] [clang] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

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

[clang] [llvm] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr requested changes to this pull request. https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -1098,7 +1098,13 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

[clang] [clang-tools-extra] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -1098,7 +1098,13 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

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