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

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

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

2023-11-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69915 >From b82acd12f1217468d6fc53ab2b2f5856802b9b78 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) casts

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

2023-11-06 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?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= ,

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

2023-11-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: @@ -1894,6 +1894,8 @@ void TypePrinter::printAttributedAfter(const AttributedType *T, case attr::ArmMveStrictPolymorphism:

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

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

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

2023-11-06 Thread Timm Baeder via cfe-commits
tbaederr wrote: > I don't have a good idea how a release note could be phrased here, but if you > could try one, it would be appreciated and I think it is worth doing. You mean about this change specifically? > Side note: it would be really cool if at the end of the release cycle, you > did a

[clang] [clang][Interp] Fix creating APSInt from IntegralAP (PR #71410)

2023-11-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71410 The boolean argument in the APSInt constructor is IsUnsigned, not IsSigned. This marks the 10th time I've run into this issue. Happy anniversary. >From 81836da057f2703f49f30d31955306577a0e1170 Mon Sep 17 00:00:

[clang] [clang][Interp] Fix creating APSInt from IntegralAP (PR #71410)

2023-11-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71410 >From 8984ebb39a4bb2ba475440b0ed41c534f586a4c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 6 Nov 2023 16:59:33 +0100 Subject: [PATCH] [clang][Interp] Fix creating APSInt from Integral

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

2023-11-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?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

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

2023-11-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?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

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

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

[clang] [C++20] [Modules] Introduce thin BMI (PR #71622)

2023-11-07 Thread Timm Baeder via cfe-commits
@@ -270,6 +274,35 @@ namespace clang { }; } +bool clang::MayDefAffectABI(const Decl *D) { + if (auto *FD = dyn_cast(D)) { +if (FD->isInlined() || FD->isConstexpr()) + return true; + +// Non-user-provided functions get emitted as weak definitions with every +

[clang] [C++20] [Modules] Introduce thin BMI (PR #71622)

2023-11-07 Thread Timm Baeder via cfe-commits
@@ -270,6 +274,35 @@ namespace clang { }; } +bool clang::MayDefAffectABI(const Decl *D) { + if (auto *FD = dyn_cast(D)) { tbaederr wrote: ```suggestion if (const auto *FD = dyn_cast(D)) { ``` https://github.com/llvm/llvm-project/pull/71622 _

[clang] [clang][Interp] Consider bit width in toAPSInt() (PR #71646)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71646 In `Interp.h`, when a add/sub/mul fails, we call this code and expect to get an `APSInt` back that can handle more than the current bitwidth of the type. >From a5a7c82862990475630a21d6aabb319acc6a80b2 Mon Sep 1

[clang] [clang][Interp] Consider bit width in IntegralAP::toAPSInt() (PR #71646)

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

[clang] [clang][Interp] Fix creating APSInt from IntegralAP (PR #71410)

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

[clang] [clang][Interp] Implement IntegralAP subtraction (PR #71648)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71648 The tests currently fail because they need one of the other open `IntegralAP` PRs. Will update this once they are pushed. >From 068feee9c34a8fc22675d17e257f166235a8803e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q

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

2023-11-08 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] Only build static analyzer sources if requested (PR #71653)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71653 There used to be a patch similar to this on Phabricator. I asked a long time ago if I can pick it up but the author told me they will work on it, which never happened. IIRC there also was a problem with this s

[clang] [clang][Interp] Implement __builtin_parity (PR #71662)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71662 None >From a4a04d1ef43a680d9ced9d1cdd7db05cbc567436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 12:28:52 +0100 Subject: [PATCH] [clang][Interp] Implement __builtin_parity

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71671 These are actually quite useful to print. >From 2b257a11a78db4769af6751dbc9bd2f37a2b4c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 13:32:41 +0100 Subject: [PATCH] [clang

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71687 Since the return value of this function is slightly more involved than the void/bool/int/size_t return values we've seen so far, also refactor this. >From 140555c8af75fcf117d10d7877f4cd248b9f7480 Mon Sep 17 00:

[clang] [clang][Interp] Consider bit width in IntegralAP::toAPSInt() (PR #71646)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71646 >From 8761ed0d3f0630dd53ed7ff8b6ce30c19dbd9e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 06:08:04 +0100 Subject: [PATCH] [clang][Interp] Consider bit width in toAPSInt()

[clang] [clang][Interp] Implement IntegralAP subtraction (PR #71648)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71648 >From fa03e5b0141c4f106811b3738d4895bfcbe358c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 06:49:41 +0100 Subject: [PATCH] [clang][Interp] Implement IntegralAP subtraction

[clang] [clang][Interp] Implement IntegralAP subtraction (PR #71648)

2023-11-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71648 >From 2c67326eedeea4ddfc3774600370abe1d8d99dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 06:49:41 +0100 Subject: [PATCH] [clang][Interp] Implement IntegralAP subtraction

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

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

[lld] [compiler-rt] [libunwind] [lldb] [libc] [libcxx] [flang] [clang-tools-extra] [llvm] [clang] Test branch (PR #70505)

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

[clang] [clang][Interp] Consider bit width in IntegralAP::toAPSInt() (PR #71646)

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

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

2023-11-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/69597 >From be120871fa8486ce9dd6cabb0a0b27d8371896b8 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 IntegralAP subtraction (PR #71648)

2023-11-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71648 >From f1421c190fd480a664bab80281db1e8abb1056a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 8 Nov 2023 06:49:41 +0100 Subject: [PATCH] [clang][Interp] Implement IntegralAP subtraction

[clang] [clang][Interp] Implement IntegralAP subtraction (PR #71648)

2023-11-09 Thread Timm Baeder via cfe-commits
tbaederr wrote: Tests should work now https://github.com/llvm/llvm-project/pull/71648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2023-11-09 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: @@ -0,0 +1,816 @@ +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -fexperi

[clang] [clang][Interp] Implement bitwise operations for IntegralAP (PR #71807)

2023-11-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71807 None >From 4d13e7b92c5d6bf08554a2e251ba65b8f433fb87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 9 Nov 2023 14:29:51 +0100 Subject: [PATCH] [clang][Interp] Implement bitwise operation

[clang] [Clang] add user-level sizeless attribute (PR #71894)

2023-11-09 Thread Timm Baeder via cfe-commits
@@ -2400,7 +2402,66 @@ bool Type::isWebAssemblyTableType() const { return false; } -bool Type::isSizelessType() const { return isSizelessBuiltinType(); } +bool Type::isSizelessType() const { + // Check if this type or any of its constituents are sizeless, due to + // being

[clang] [Clang] add user-level sizeless attribute (PR #71894)

2023-11-09 Thread Timm Baeder via cfe-commits
@@ -2400,7 +2402,66 @@ bool Type::isWebAssemblyTableType() const { return false; } -bool Type::isSizelessType() const { return isSizelessBuiltinType(); } +bool Type::isSizelessType() const { + // Check if this type or any of its constituents are sizeless, due to + // being

[clang] [Clang] add user-level sizeless attribute (PR #71894)

2023-11-09 Thread Timm Baeder via cfe-commits
@@ -2400,7 +2402,66 @@ bool Type::isWebAssemblyTableType() const { return false; } -bool Type::isSizelessType() const { return isSizelessBuiltinType(); } +bool Type::isSizelessType() const { tbaederr wrote: The name of this function sounds like this is a si

[clang] [Clang] add user-level sizeless attribute (PR #71894)

2023-11-09 Thread Timm Baeder via cfe-commits
@@ -2400,7 +2402,66 @@ bool Type::isWebAssemblyTableType() const { return false; } -bool Type::isSizelessType() const { return isSizelessBuiltinType(); } +bool Type::isSizelessType() const { + // Check if this type or any of its constituents are sizeless, due to + // being

[clang] [Clang] add user-level sizeless attribute (PR #71894)

2023-11-09 Thread Timm Baeder via cfe-commits
@@ -2400,7 +2402,66 @@ bool Type::isWebAssemblyTableType() const { return false; } -bool Type::isSizelessType() const { return isSizelessBuiltinType(); } +bool Type::isSizelessType() const { + // Check if this type or any of its constituents are sizeless, due to + // being

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

2023-11-10 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] Diagnose reads from non-const global variables (PR #71919)

2023-11-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71919 This fixes a long-standing FIXME item. Unfortunately it changes the diagnostic output of the tests added in `cxx23.cpp`, but they were wrong before and are wrong after, so no big deal. >From bc71936279a1c669a8

[clang] [clang][Interp] Handle SizeOfPackExprs (PR #71929)

2023-11-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71929 None >From 1fe6815c82c1df26f35edcd64e85d4a2fd584f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 10 Nov 2023 13:04:30 +0100 Subject: [PATCH] [clang][Interp] Handle SizeOfPackExprs --

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

2023-11-10 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: @@ -1894,6 +1894,8 @@ void TypePrinter::printAttributedAfter(const AttributedType *T, case attr::ArmMveStrictPolymorphism:

[clang] [clang][Interp] Implement __builtin_classify_type (PR #71972)

2023-11-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/71972 This adds some infrastructure for unevaluated builtin calls, but the implementation is almost entirely copied from `ExprConstant.cpp`. I'm open for suggestions on how to share the code. >From 01e541c726de7bd2a

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-11 Thread Timm Baeder via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the f

[llvm] [clang] [clang] Add bitint classification for __builtin_classify_type (PR #72036)

2023-11-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/72036 See #71911 >From 20ec7adfd769b10b74f5104ee308fd9b58b44208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 11 Nov 2023 18:44:13 +0100 Subject: [PATCH] [clang] Add bitint classification fo

[clang] [clang] Add bitint classification for __builtin_classify_type (PR #72036)

2023-11-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/72036 >From f3cd338335dbbaf89248b6d207379d325166977e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 11 Nov 2023 18:44:13 +0100 Subject: [PATCH] [clang] Add bitint classification for __builtin_

[clang] [clang] Add bitint classification for __builtin_classify_type (PR #72036)

2023-11-11 Thread Timm Baeder via cfe-commits
@@ -1060,7 +1060,7 @@ if (UNIX AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 - append("-fdiagnostics-color" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + append("-fdiagnostics-col

[clang] [clang] Add bitint classification for __builtin_classify_type (PR #72036)

2023-11-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/72036 >From c7210706c0f45d3f4693e796970c73e3ef6dd48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 11 Nov 2023 18:44:13 +0100 Subject: [PATCH] [clang] Add bitint classification for __builtin_

[clang] [clang][Interp] Handle SizeOfPackExprs (PR #71929)

2023-11-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/71929 ___ 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-11-11 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-11-11 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-11-11 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-11-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

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

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

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

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

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

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

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

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

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

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

[clang] [clang][Interp] Implement __builtin_parity (PR #71662)

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

[clang] [clang][Interp] Implement __builtin_bitreverse (PR #71687)

2023-11-13 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/71687 ___ 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)

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

[clang] [clang] Only build static analyzer sources if requested (PR #71653)

2023-11-13 Thread Timm Baeder via cfe-commits
@@ -23,7 +23,9 @@ add_subdirectory(Tooling) add_subdirectory(DirectoryWatcher) add_subdirectory(Index) add_subdirectory(IndexSerialization) -add_subdirectory(StaticAnalyzer) +if(CLANG_ENABLE_STATIC_ANALYZER) tbaederr wrote: Well yes, but I'm not introducing th

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

2023-11-14 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 __builtin_clrsb (PR #72243)

2023-11-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/72243 None >From 0a5cc373736f6c9e29f4f8af438d37dd007f09e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 14 Nov 2023 12:42:03 +0100 Subject: [PATCH] [clang][Interp] Implement __builtin_clrsb

[clang] [Sema] Check nullness of captured type before use (PR #72230)

2023-11-14 Thread Timm Baeder via cfe-commits
@@ -23,3 +23,9 @@ int pr43080(int i) { // expected-note {{declared here}} i; // expected-error {{variable 'i' cannot be implicitly captured in a lambda with no capture-default specified}} }(); } + +void pr72198() { + int [_, b] = {0, 0}; // expected-error{{decompositi

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

2023-11-14 Thread Timm Baeder via cfe-commits
@@ -129,7 +129,13 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, /// Classifies a type. std::optional classify(const Expr *E) const { -return E->isGLValue() ? PT_Ptr : classify(E->getType()); +if (E->isGLValue()) { + if (E->getType()->isFunctionTy

[clang] [clang][Interp] Fix classify for glvalues of function type (PR #72269)

2023-11-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/72269 This can't be tested right now but will show up once we use the new interpreter in evaluateAsConstantExpression() as well. Pulled out from https://github.com/llvm/llvm-project/pull/70763 >From 074dd59057f1e1e1

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

2023-11-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/70663 ___ 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-12-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: @@ -1894,6 +1894,8 @@ void TypePrinter::printAttributedAfter(const AttributedType *T, case attr::ArmMveStrictPolymorphism:

[clang] [clang] Crash when referencing capture in static lambda (PR #74661)

2023-12-07 Thread Timm Baeder via cfe-commits
@@ -8492,14 +8492,24 @@ 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); tbaederr wrote: ``

[clang] [clang][Interp] Reject static lambdas with captures (PR #74718)

2023-12-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/74718 A version of #74661 for the new interpreter. It didn't crash before, but we did emit a few non-sensical diagnostics. >From 6ac52b644cbd5e12ad13e6c3c2bf84b96ec5f3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=

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

2023-12-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?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (& [Sema] Print more static_assert exprs) (PR #74775)

2023-12-08 Thread Timm Baeder via cfe-commits
tbaederr wrote: I don't have the capacity to review this properly, but the changes to the `static_assert` diagnostics should be split out IMO. https://github.com/llvm/llvm-project/pull/74775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

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

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

[clang] [clang][Interp] Implement __builtin_rotate{right, left} (PR #72984)

2023-12-08 Thread Timm Baeder via cfe-commits
@@ -331,3 +331,17 @@ namespace bitreverse { char bitreverse3[__builtin_bitreverse32(0x12345678) == 0x1E6A2C48 ? 1 : -1]; char bitreverse4[__builtin_bitreverse64(0x0123456789ABCDEFULL) == 0xF7B3D591E6A2C480 ? 1 : -1]; } + +namespace rotateleft { + char rotateleft1[__builti

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

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

[clang] [clang][Interp] Implement IntegralAP::{div, rem} (PR #72614)

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

[clang] [clang][Interp] Diagnose reads from non-const global variables (PR #71919)

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

[clang] [clang][Interp] Add an EvaluationResult class (PR #71315)

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

[clang] [clang][Interp] Fix float->int casts overflowing (PR #72658)

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

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

2023-12-08 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/69597 ___ 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)

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

[clang] [clang][Interp] Decay arrays to the first element (PR #72660)

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

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

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

[clang] [clang][Interp] Use array filler expression (PR #72865)

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

[clang] [clang][Interp] Implement __builtin_rotate{right, left} (PR #72984)

2023-12-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/72984 >From 71ee39aaf9e962701168290394333654a22ed918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Nov 2023 13:44:07 +0100 Subject: [PATCH] [clang][Interp] Implement __builtin_rotate{right

[clang] [clang][Interp] Don't diagnose undefined functions when checking... (PR #75051)

2023-12-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/75051 ... for a potential constant expression. They are not defined now, but might be defined later when the function is actually called. >From 74d11ff5c8bd2dbc641e2d602cd3d463f02f59f6 Mon Sep 17 00:00:00 2001 From:

[clang] [clang][Interp] Fix float->int casts overflowing (PR #72658)

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

[clang] [clang][Interp] Fix classify for glvalues of function type (PR #72269)

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

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

2023-11-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/70763 >From 95db8094955756851e59a377cc13af9c30987221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 30 Oct 2023 16:14:24 +0100 Subject: [PATCH] [clang] Use new interpreter in EvaluateAsConstan

[clang] [clang] Only build static analyzer sources if requested (PR #71653)

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

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

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

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

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

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

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

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

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

[clang] [clang][Interp] Implement IntegralAP subtraction (PR #71648)

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

[clang] [clang][Interp] Implement bitwise operations for IntegralAP (PR #71807)

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

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

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

[clang] [clang][Interp] Implement bitwise operations for IntegralAP (PR #71807)

2023-11-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/71807 >From 72b46d891d34e7c0810bec335221a109cf4fb3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 9 Nov 2023 14:29:51 +0100 Subject: [PATCH] [clang][Interp] Implement bitwise operations for

  1   2   3   4   5   6   7   8   9   10   >