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

2024-01-22 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/67095 ___ cfe

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

2024-01-22 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: tbaederr wrote: > Seems you pinged this without the commit to fix the things we've requested? Right, I was more looking for guidance what to do w

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

2024-01-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/79130 Initialize the first element to 0 and the second element to the value of the subexpression. >From 34f0c1b9297bd817f8aaf9ddcb29457fa5e96aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue

[clang] [Clang][NFC] Optimize isAsciiIdentifierContinue (PR #78699)

2024-01-23 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/78699 ___ 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-18 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: tbaederr wrote: @AaronBallman This is still in a rough WIP state, but I've added support for bitcasts with bitfields involved, take a look at the

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

2023-10-18 Thread Timm Baeder via cfe-commits
tbaederr wrote: This doesn't build for me locally: ``` mold: error: undefined symbol: tools/clang/unittests/Driver/CMakeFiles/ClangDriverTests.dir/GCCVersionTest.cpp.o: clang::driver::toolchains::Generic_GCC::GCCVersion::Parse(llvm::StringRef) ``` https://github.com/llvm/llvm-project/pull/6907

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

2023-10-18 Thread Timm Baeder via cfe-commits
@@ -100,12 +100,13 @@ template class IntegralAP final { } static IntegralAP from(const Boolean &B) { assert(false); -return IntegralAP::zero(); +return IntegralAP::zero(1); tbaederr wrote: Removed that code in https://github.com/llvm/llvm-pro

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

2023-10-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/68081 >From d6b0b306353fb2d8eaef6835f6313277eaf94bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 3 Oct 2023 11:05:27 +0200 Subject: [PATCH] [clang][Interp] IntegralAP zero-init --- clang/

[clang] Correct end for the CastOperation.OpRange (PR #69480)

2023-10-18 Thread Timm Baeder via cfe-commits
tbaederr wrote: The output looks good, but you should probably add a test in `clang/test/Misc/misc-source-ranges.cpp`. https://github.com/llvm/llvm-project/pull/69480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

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

2023-10-18 Thread Timm Baeder via cfe-commits
@@ -847,7 +845,33 @@ template bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) { if (Initializing) return this->visitInitializer(E->getSourceExpr()); - return this->visit(E->getSourceExpr()); + + PrimType CacheVariableTy = classify(E).value_or(PT_Pt

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

2023-10-18 Thread Timm Baeder via cfe-commits
@@ -847,7 +845,33 @@ template bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) { if (Initializing) return this->visitInitializer(E->getSourceExpr()); - return this->visit(E->getSourceExpr()); + + PrimType CacheVariableTy = classify(E).value_or(PT_Pt

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

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

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

2023-10-18 Thread Timm Baeder via cfe-commits
@@ -847,7 +845,33 @@ template bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) { if (Initializing) return this->visitInitializer(E->getSourceExpr()); - return this->visit(E->getSourceExpr()); + + PrimType CacheVariableTy = classify(E).value_or(PT_Pt

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

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

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

2023-10-18 Thread Timm Baeder via cfe-commits
@@ -810,9 +810,7 @@ bool ByteCodeExprGen::VisitArrayInitLoopExpr( const ArrayInitLoopExpr *E) { assert(Initializing); assert(!DiscardResult); - // TODO: This compiles to quite a lot of bytecode if the array is larger. - // Investigate compiling this to a loop, or at

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

2023-10-18 Thread Timm Baeder via cfe-commits
@@ -847,7 +845,33 @@ template bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) { if (Initializing) return this->visitInitializer(E->getSourceExpr()); - return this->visit(E->getSourceExpr()); + + PrimType CacheVariableTy = classify(E).value_or(PT_Pt

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

2023-10-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed 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] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

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

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Have you seen the failing buildbots? https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Have you seen the failing buildbots? https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Have you seen the failing buildbots? https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 8ec689511d266576bd792ee8731baff9ec0e7143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:33:30 +0200 Subject: [PATCH] [clang][Interp] Implement dynamic memory allocat

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

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

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From abc2a0b7c5beefc28e6d88f9718c5aefe1fbf044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:33:30 +0200 Subject: [PATC

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 33d24cd22642d2a6f9b00aaa3826472381e93d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:33:30 +0200 Subject: [PATC

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 33d24cd22642d2a6f9b00aaa3826472381e93d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 25 Oct 2023 08:3

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69223 >From f75f7683f59a81dba1c58a8bb9706b2c12d9a261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 16 Oct 2023 17:5

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

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

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

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

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 33d24cd22642d2a6f9b00aaa3826472381e93d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70306 >From 33d24cd22642d2a6f9b00aaa3826472381e93d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?

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

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

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

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

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

2023-10-26 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69223 >From a4610e034b8331b201e282ef034e83095cbe395f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Da

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

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

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

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

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

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

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

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

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