[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][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: @@

[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:

[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

[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

[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

[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

[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: https://github.com/tbaederr updated

[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

[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=instructions%3Au=tbaederr https://github.com/llvm/llvm-project/pull/66203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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

[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][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][Sema] Only check RVV types if we have them (PR #67669)

2023-10-06 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][Diagnostics] Add bitfield source range to zero width diags (PR #68312)

2023-10-06 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][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

[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,

[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][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:

[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
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

[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][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-10-05 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] [clang][ExprConst] Don't try to evaluate value-dependent DeclRefExprs (PR #67778)

2023-10-05 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

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

2023-10-04 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][Interp] Emit dummy values for unknown C variables (PR #66749)

2023-10-04 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][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:

[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'

[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'

[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:

[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:

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

2023-10-03 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

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

2023-10-03 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][Interp] Add basic support for _BitInt (PR #68069)

2023-10-03 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

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

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

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

2023-10-03 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

[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] 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] 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] 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][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

[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] 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] 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:

[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 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:

[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

[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.

[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] 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

[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:

[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

[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] Implement IntegralAP::comp (PR #67954)

2023-10-02 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] 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: I pushed a fix that hopefully works, let me know if it doesn't.

[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

[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}} \ //

[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

[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

[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:

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

2023-09-30 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

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

2023-09-30 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] Handle CXXScalarValueInitExprs (PR #67147)

2023-09-30 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

[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 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

[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

[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

[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:

[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] 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.

[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][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
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

[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:

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

2023-09-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?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/65844 >From 0d879e0dc2ae8bb24e396dc0cf1a6e7215fb1e2e Mon Sep 17

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

2023-09-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 resolved https://github.com/llvm/llvm-project/pull/65844 ___ cfe-commits mailing list

[clang] [clang][Interp] Three-way comparisons (PR #65901)

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/65901 ___ 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-09-29 Thread Timm Baeder via cfe-commits
tbaederr wrote: I've removed the second commit, so this needs https://github.com/llvm/llvm-project/pull/67229 to be merged first. https://github.com/llvm/llvm-project/pull/67147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67147 >From a64adec2680206523c99122dc53c2c5c2778e961 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] Fix a crash from nested ArrayInitLoopExpr (PR #67722)

2023-09-29 Thread Timm Baeder via cfe-commits
tbaederr wrote: I've pushed https://github.com/llvm/llvm-project/commit/38018ecf965fda81d15edfb904b5b28adb6051b0 since, so you could remove the `CUR_INTERP` stuff from there and get a new test case for free. https://github.com/llvm/llvm-project/pull/67722

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

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66862 >From f2b9dec7ccf73258eb74c1823e4a954a459b5d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 20 Sep 2023 08:18:51 +0200 Subject: [PATCH] [clang][Interp] Zero-init remaining string

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

2023-09-29 Thread Timm Baeder via cfe-commits
@@ -858,8 +858,8 @@ bool ByteCodeExprGen::VisitStringLiteral(const StringLiteral *E) { // If the initializer string is too long, a diagnostic has already been // emitted. Read only the array length from the string literal. - unsigned N = -

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

2023-09-28 Thread Timm Baeder via cfe-commits
tbaederr wrote: Remove the `Interp/` changes please, I'll have a look at that later. 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][ExprConst] Don't create useless temporary variable (PR #67716)

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

[clang] [clang][ExprConst] Don't create useless temporary variable (PR #67716)

2023-09-28 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ah, didn't realize that. We should have a test case for this. https://github.com/llvm/llvm-project/pull/67716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't create useless temporary variable (PR #67716)

2023-09-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67716 We never use it anyway. This code has been introduced in 410306bf6ed906af77978caa199e5d96376bae66, but it didn't really do anything back then either, as far as I can tell. Fixes #57135 >From

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

2023-09-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited 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 is we have them (PR #67669)

2023-09-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67669 isRVVType() is suprisingly expensive, so do the checks only if the target has rvv types. >From 847451fdf8c70b1deebdd4d4cf4ce3ce84845f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu,

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

2023-09-27 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping 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] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2023-09-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr converted_to_draft 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][Diagnostics] Make 'note' color CYAN (PR #66997)

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

[clang] [clang][Diagnostics] Make 'note' color CYAN (PR #66997)

2023-09-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66997 >From 5670ee4eab71549c686cb583e7ab0a14c51dce68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 21 Sep 2023 12:01:30 +0200 Subject: [PATCH] [clang][Diagnostics] Make 'note' color CYAN

[clang] [clang][Diagnostics] Make 'note' color CYAN (PR #66997)

2023-09-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66997 >From 8d7c79946f8afecf3313bcccbb5b45133242bf8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 21 Sep 2023 12:01:30 +0200 Subject: [PATCH] [clang][Diagnostics] Make 'note' color CYAN

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

2023-09-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?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated

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

2023-09-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?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated

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

2023-09-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/67520 There's a problem with this attribute where the declaration in a header file doesn't have the attribute, but the definition in the source file has. As a result, the attribute doesn't take effect when just the

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

2023-09-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?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From

[clang] [clang][Interp] Three-way comparisons (PR #65901)

2023-09-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/65901 >From 5dc457a45bdf8366a5f8e5d7df7bcf3383120ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 10 Sep 2023 17:02:22 +0200 Subject: [PATCH] [clang][Interp] Three-way comparisons ---

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

2023-09-26 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

<    4   5   6   7   8   9   10   11   >