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

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > > This was much easier than expected actually. > > Making it a `DeclOrType` attribute is indeed a nice idea, this would allow > existing attributes to stay where they are. Is it still inheritable, i.e. > does it also apply to

[clang] [clang]Avoid diagnose invalid consteval call for invalid function decl (PR #68646)

2023-10-10 Thread via cfe-commits
@@ -358,6 +358,8 @@ Bug Fixes in This Version Fixes (`#67690 `_) - Fixes a ``clang-17`` regression where ``LLVM_UNREACHABLE_OPTIMIZE=OFF`` cannot be used with ``Release`` mode builds. (`#68237

[clang] [clang]Avoid diagnose invalid consteval call for invalid function decl (PR #68646)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. I was about to work on that and figured the fix would be along those lines! Glad you got to it first, thanks! The changes look great https://github.com/llvm/llvm-project/pull/68646 ___ cfe-commi

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread via cfe-commits
@@ -2393,7 +2393,7 @@ def err_auto_not_allowed : Error< "|in type allocated by 'new'|in K&R-style function parameter" "|in template parameter|in friend declaration|in function prototype that is " "not a function declaration|in requires expression parameter" - "|in array

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. A small nit, otherwise LGTM I'm not sure it's strictly necessary here, but you could add a release note in clang/docs/ReleaseNotes.rst - under the diagnostics improvement section https://github.com/llvm/llvm-project/pull/68540 ___

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/68540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. I think there is an opportunity for a small refactor here, but feel free to land this and we can handle the refactor later as an NFC change if you prefer https://github.com/llvm/llvm-project/pull/68506 _

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/68506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] __is_trivially_equality_comparable for types containing lambdas (PR #68506)

2023-10-10 Thread via cfe-commits
@@ -2663,6 +2663,9 @@ static bool HasNonDeletedDefaultedEqualityComparison(const CXXRecordDecl *Decl) { if (Decl->isUnion()) return false; + if (Decl->isLambda()) +return Decl->captures().empty() && + (Decl->getLambdaCaptureDefault() == LCD_None); -

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread via cfe-commits
@@ -14935,15 +14935,15 @@ ExprResult Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, CXXMethodDecl *Method = cast(FnDecl); SmallVector MethodArgs; -// Handle 'this' parameter if the selected function is not static. +// Initialize

[clang] [flang][driver] Mark -fcommon and -mtune as visible in Flang (PR #68657)

2023-10-10 Thread Fangcao Wang via cfe-commits
https://github.com/LittleMeepo updated https://github.com/llvm/llvm-project/pull/68657 >From d056372043e9ee55caf4a7c8d1f708658986cfd1 Mon Sep 17 00:00:00 2001 From: wangfc Date: Tue, 10 Oct 2023 11:06:11 +0800 Subject: [PATCH] [flang][driver] Mark -fcommon and -mtune as visible in Flang --- c

[clang] 19d1da5 - [clang]Avoid diagnose invalid consteval call for invalid function decl (#68646)

2023-10-10 Thread via cfe-commits
Author: Congcong Cai Date: 2023-10-10T15:32:10+08:00 New Revision: 19d1da59dcdea46d30d93a48c389856e89c57b5d URL: https://github.com/llvm/llvm-project/commit/19d1da59dcdea46d30d93a48c389856e89c57b5d DIFF: https://github.com/llvm/llvm-project/commit/19d1da59dcdea46d30d93a48c389856e89c57b5d.diff

[clang] [clang]Avoid diagnose invalid consteval call for invalid function decl (PR #68646)

2023-10-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/68646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/68510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D154951: [clang][Interp] __builtin_bit_cast, Take 2

2023-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder abandoned this revision. tbaeder added a comment. Abandoning this since I've migrated it to Github: https://github.com/llvm/llvm-project/pull/68288 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154951/new/ https://reviews.llvm.org/D154951

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/3] [clang] static operators should evaluate object argument

[clang] [AST] Use explicit type erasure in TypeSourceInfo constructor (PR #68435)

2023-10-10 Thread via cfe-commits
@@ -243,7 +243,7 @@ class TypeLoc { inline TypeSourceInfo::TypeSourceInfo(QualType ty, size_t DataSize) : Ty(ty) { // Init data attached to the object. See getTypeLoc. - memset(this + 1, 0, DataSize); + memset(const_cast(static_cast(this + 1)), 0, DataSize); --

[clang] [flang][driver] Mark -fcommon and -mtune as visible in Flang (PR #68657)

2023-10-10 Thread Fangcao Wang via cfe-commits
https://github.com/LittleMeepo updated https://github.com/llvm/llvm-project/pull/68657 >From b7de162c0cd91864b1637ec184457b825e8727bc Mon Sep 17 00:00:00 2001 From: wangfc Date: Tue, 10 Oct 2023 11:06:11 +0800 Subject: [PATCH] [flang][driver] Mark -fcommon and -mtune as visible in Flang --- c

[clang] 3542dd8 - [clang][Interp][NFC] Move int128 tests to their own file

2023-10-10 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-10-10T09:54:08+02:00 New Revision: 3542dd8f9179dc25ac0a21972d1d4fe66da174e0 URL: https://github.com/llvm/llvm-project/commit/3542dd8f9179dc25ac0a21972d1d4fe66da174e0 DIFF: https://github.com/llvm/llvm-project/commit/3542dd8f9179dc25ac0a21972d1d4fe66da174e0.diff LO

[clang-tools-extra] [Legalizer] Expand fmaximum and fminimum (PR #67301)

2023-10-10 Thread Jay Foad via cfe-commits
@@ -8177,6 +8177,64 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, jayfoad wrote: > Can MIR be valid input for legalizers? No, sorry, please ignore that part.

[clang] [Legalizer] Expand fmaximum and fminimum (PR #67301)

2023-10-10 Thread Jay Foad via cfe-commits
@@ -8177,6 +8177,64 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, jayfoad wrote: > Can MIR be valid input for legalizers? No, sorry, please ignore that part.

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-10 Thread Björn Pettersson via cfe-commits
https://github.com/bjope updated https://github.com/llvm/llvm-project/pull/68590 From 8ef4560759280bbc14e0dc6c01efc036d0410dca Mon Sep 17 00:00:00 2001 From: Bjorn Pettersson Date: Mon, 9 Oct 2023 16:13:39 +0200 Subject: [PATCH] [Sema] Handle large shift counts in GetExprRange GetExprRange did

[clang-tools-extra] [AMDGPU] Add encoding/decoding support for non-result-returning ATOMIC_CSUB instructions (PR #68197)

2023-10-10 Thread Stephen Thomas via cfe-commits
https://github.com/stepthomas closed https://github.com/llvm/llvm-project/pull/68197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-10 Thread via cfe-commits
https://github.com/DaMatrix updated https://github.com/llvm/llvm-project/pull/66894 >From 95c018c67b5ca10e86065fc3d0cb60f507626f34 Mon Sep 17 00:00:00 2001 From: DaPorkchop_ Date: Sun, 13 Aug 2023 22:39:12 +0200 Subject: [PATCH] [clang] Implement constexpr bit_cast for vectors --- .../include

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/68565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
@@ -9665,18 +9665,34 @@ Value *CodeGenFunction::EmitSMEZero(const SVETypeFlags &TypeFlags, Value *CodeGenFunction::EmitSMELdrStr(const SVETypeFlags &TypeFlags, SmallVectorImpl &Ops, unsigned IntID) { -

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
@@ -44,10 +44,9 @@ defm SVLD1_ZA32 : ZALoad<"za32", "i", "aarch64_sme_ld1w", [ImmCheck<0, ImmCheck0 defm SVLD1_ZA64 : ZALoad<"za64", "l", "aarch64_sme_ld1d", [ImmCheck<0, ImmCheck0_7>]>; defm SVLD1_ZA128 : ZALoad<"za128", "q", "aarch64_sme_ld1q", [ImmCheck<0, ImmCheck0_15>]>;

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
@@ -2680,9 +2680,9 @@ let TargetPrefix = "aarch64" in { // Spill + fill def int_aarch64_sme_ldr : DefaultAttrsIntrinsic< -[], [llvm_i32_ty, llvm_ptr_ty]>; +[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], [ImmArg>]>; sdesmalen-arm wrote: Is it easier

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm commented: The changes to the LLVM IR intrinsics are to better utilise the reg+imm form of the instructions, but they aren't required to remove the immediate-argument restriction for svldr/svstr. I think it would be better to split the PR into two PRs: * One pa

[clang] 7d2b569 - [Sema] Handle large shift counts in GetExprRange (#68590)

2023-10-10 Thread via cfe-commits
Author: Björn Pettersson Date: 2023-10-10T10:25:01+02:00 New Revision: 7d2b569cc42487c85982aa3ebc8243204042d2ce URL: https://github.com/llvm/llvm-project/commit/7d2b569cc42487c85982aa3ebc8243204042d2ce DIFF: https://github.com/llvm/llvm-project/commit/7d2b569cc42487c85982aa3ebc8243204042d2ce.di

[clang] [Sema] Handle large shift counts in GetExprRange (PR #68590)

2023-10-10 Thread Björn Pettersson via cfe-commits
https://github.com/bjope closed https://github.com/llvm/llvm-project/pull/68590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[PATCH] D158156: [analyzer] Add C++ array delete checker

2023-10-10 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG71ae858c079f: [clang][analyzer] Rename DeleteWithNonVirtualDtorChecker to CXXDeleteChecker (authored by Viktor Cseh ). Changed prior to commit: https://reviews.llvm.org/D15815

[clang] 0e246bb - [clang][analyzer] Add C++ array delete checker

2023-10-10 Thread Viktor Cseh via cfe-commits
Author: Viktor Cseh Date: 2023-10-10T09:37:02+01:00 New Revision: 0e246bb67573799409d0085b89902a330998ddcc URL: https://github.com/llvm/llvm-project/commit/0e246bb67573799409d0085b89902a330998ddcc DIFF: https://github.com/llvm/llvm-project/commit/0e246bb67573799409d0085b89902a330998ddcc.diff L

[clang] 71ae858 - [clang][analyzer] Rename DeleteWithNonVirtualDtorChecker to CXXDeleteChecker

2023-10-10 Thread Viktor Cseh via cfe-commits
Author: Viktor Cseh Date: 2023-10-10T09:37:02+01:00 New Revision: 71ae858c079f9b4a1a99511af57f47ffb6070920 URL: https://github.com/llvm/llvm-project/commit/71ae858c079f9b4a1a99511af57f47ffb6070920 DIFF: https://github.com/llvm/llvm-project/commit/71ae858c079f9b4a1a99511af57f47ffb6070920.diff L

[clang] ce9077f - [clang][Interp] Fix intap tests if int128 is not supported

2023-10-10 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-10-10T10:38:05+02:00 New Revision: ce9077fe7f0ceb2800076aa1abb472de5df41f16 URL: https://github.com/llvm/llvm-project/commit/ce9077fe7f0ceb2800076aa1abb472de5df41f16 DIFF: https://github.com/llvm/llvm-project/commit/ce9077fe7f0ceb2800076aa1abb472de5df41f16.diff LO

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

2023-10-10 Thread via cfe-commits
cor3ntin wrote: @tbaederr Shafik already approved that - still looks good :) https://github.com/llvm/llvm-project/pull/67229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics

2023-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a subscriber: aaron.ballman. cor3ntin added a comment. + @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159351/new/ https://reviews.llvm.org/D159351 ___ cfe-commits mailing l

[PATCH] D156212: [clang][Interp] Implement remaining strcmp builtins

2023-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. There are still unaddressed comment here. It would be nice to complete this before phab shuts down Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156212/new/ https://reviews.llvm.org/D156212 __

[PATCH] D156212: [clang][Interp] Implement remaining strcmp builtins

2023-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. I have a local patch that implements these builtins by doing a bitcast to a buffer first. There is a comment in `ExprConstant.cpp` that talks about the same thing. That path probably makes more sense? I'd abandon this review then. Repository: rG LLVM Github Monorepo

[clang] [SVE][InstCombine] Delete redundante sel instructions with ptrue (PR #68463)

2023-10-10 Thread David Sherwood via cfe-commits
@@ -800,6 +800,13 @@ instCombineConvertFromSVBool(InstCombiner &IC, IntrinsicInst &II) { static std::optional instCombineSVESel(InstCombiner &IC, IntrinsicInst &II) { + // svsel(ptrue, x, y) => x + auto *OpPredicate = II

[clang] [SVE][InstCombine] Delete redundante sel instructions with ptrue (PR #68463)

2023-10-10 Thread David Sherwood via cfe-commits
@@ -63,6 +63,20 @@ svint32_t test_svsel_s32(svbool_t pg, svint32_t op1, svint32_t op2) return SVE_ACLE_FUNC(svsel,_s32,,)(pg, op1, op2); } +// CHECK-LABEL: @test_svsel_s32_ptrue( david-arm wrote: I'm not sure if this test really adds any more value, since

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin commented: LGTM modulo nitpick. Maybe @AaronBallman will want to look at it too. Do we want a release notes for this? https://github.com/llvm/llvm-project/pull/65638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/65638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-10-10 Thread via cfe-commits
@@ -27,6 +27,7 @@ #include "clang/AST/Randstruct.h" #include "clang/AST/StmtCXX.h" #include "clang/Basic/Builtins.h" +#include "clang/Basic/DiagnosticSema.h" cor3ntin wrote: I don't think adding this header is necessary https://github.com/llvm/llvm-project/pu

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Tianlan Zhou via cfe-commits
https://github.com/SuperSodaSea updated https://github.com/llvm/llvm-project/pull/68485 >From 03276260c48d9cafb2a0d80825156e77cdf02eba Mon Sep 17 00:00:00 2001 From: SuperSodaSea Date: Sat, 7 Oct 2023 21:05:17 +0800 Subject: [PATCH 1/4] [clang] static operators should evaluate object argument

[clang] 17414ea - [clang][Interp] Fix returning nullptr from functions (#67229)

2023-10-10 Thread via cfe-commits
Author: Timm Baeder Date: 2023-10-10T11:19:14+02:00 New Revision: 17414eae242b77fe40ce671793bce5fb2e6a3a04 URL: https://github.com/llvm/llvm-project/commit/17414eae242b77fe40ce671793bce5fb2e6a3a04 DIFF: https://github.com/llvm/llvm-project/commit/17414eae242b77fe40ce671793bce5fb2e6a3a04.diff L

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

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

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

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

[clang] [Clang] Support target attr specifying CPU (PR #68678)

2023-10-10 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises created https://github.com/llvm/llvm-project/pull/68678 Currently targets except AArch64 cannot recognize function attribute specifying target CPU. Make it equivalent to `arch` directive. >From 78f22a8a57f5b67660763b8c7731b9d3cddede72 Mon Sep 17 00:00:00 2001 From:

[clang] [Clang] Support target attr specifying CPU (PR #68678)

2023-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qiu Chaofan (ecnelises) Changes Currently targets except AArch64 cannot recognize function attribute specifying target CPU. Make it equivalent to `arch` directive. --- Full diff: https://github.com/llvm/llvm-project/pull/68678.diff 2 Fi

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

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

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

2023-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We do a similar things a few lines above for `Index`: ``` // Get a version of the index comparable to the type. T Index = T::from(Ptr.getIndex(), Offset.bitWidth()); ``` --- Full diff: https://github.com

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

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

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2023-10-10 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68607 >From 143db26ffe8620c2b45eb15d331466c883bbfce0 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Mon, 9 Oct 2023 16:52:13 +0200 Subject: [PATCH 1/2] [analyzer] Removing untrusted buffer size taint warning alpha.s

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2023-10-10 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68607 >From 143db26ffe8620c2b45eb15d331466c883bbfce0 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Mon, 9 Oct 2023 16:52:13 +0200 Subject: [PATCH 1/3] [analyzer] Removing untrusted buffer size taint warning alpha.s

[clang] [analyzer] Removing untrusted buffer size taint warning (PR #68607)

2023-10-10 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68607 >From 143db26ffe8620c2b45eb15d331466c883bbfce0 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Mon, 9 Oct 2023 16:52:13 +0200 Subject: [PATCH 1/3] [analyzer] Removing untrusted buffer size taint warning alpha.s

[clang] [Clang][PowerPC] Support tune directive in target attribute (PR #68681)

2023-10-10 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises created https://github.com/llvm/llvm-project/pull/68681 None >From c1fbd4242c135ecbf91882d0350dc7d4c1e84b69 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Tue, 10 Oct 2023 17:50:59 +0800 Subject: [PATCH] [Clang][PowerPC] Support tune directive in target attribute

[clang] [libc++] Implement ranges::iota (PR #68494)

2023-10-10 Thread James E T Smith via cfe-commits
jamesETsmith wrote: Thanks for taking a look @philnik777! I'll try to address your comments in the next couple of days and let you know if I have any questions. https://github.com/llvm/llvm-project/pull/68494 ___ cfe-commits mailing list cfe-commits@l

[clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2023-10-10 Thread James E T Smith via cfe-commits
jamesETsmith wrote: Thanks for taking a look @philnik777! I'll try to address your comments in the next couple of days and let you know if I have any questions. https://github.com/llvm/llvm-project/pull/68494 ___ cfe-commits mailing list cfe-commits@l

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

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -8141,6 +8141,16 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D, if (!AL.checkAtLeastNumArgs(S, 1)) return; + // We allow this on function declaration as well as + // variable declarations of function

[clang] [AST] Use explicit type erasure in TypeSourceInfo constructor (PR #68435)

2023-10-10 Thread via cfe-commits
@@ -243,7 +243,7 @@ class TypeLoc { inline TypeSourceInfo::TypeSourceInfo(QualType ty, size_t DataSize) : Ty(ty) { // Init data attached to the object. See getTypeLoc. - memset(this + 1, 0, DataSize); + memset(const_cast(static_cast(this + 1)), 0, DataSize); --

[clang] [AST] Use explicit type erasure in TypeSourceInfo constructor (PR #68435)

2023-10-10 Thread via cfe-commits
https://github.com/bonktree updated https://github.com/llvm/llvm-project/pull/68435 >From 021a0664905385b0bfb212316810bd15032d1df2 Mon Sep 17 00:00:00 2001 From: Arseny Maslennikov Date: Thu, 5 Oct 2023 10:05:14 +0300 Subject: [PATCH] [AST] Use explicit type erasure in TypeSourceInfo constructo

[clang] [AST] Use explicit type erasure in TypeSourceInfo constructor (PR #68435)

2023-10-10 Thread via cfe-commits
@@ -243,7 +243,7 @@ class TypeLoc { inline TypeSourceInfo::TypeSourceInfo(QualType ty, size_t DataSize) : Ty(ty) { // Init data attached to the object. See getTypeLoc. - memset(this + 1, 0, DataSize); + memset(const_cast(static_cast(this + 1)), 0, DataSize); --

[clang] 1210738 - [clang][Interp] Handle CXXScalarValueInitExprs (#67147)

2023-10-10 Thread via cfe-commits
Author: Timm Baeder Date: 2023-10-10T12:45:09+02:00 New Revision: 12107386ca13f206daf67b06bfe394ba4b2758fb URL: https://github.com/llvm/llvm-project/commit/12107386ca13f206daf67b06bfe394ba4b2758fb DIFF: https://github.com/llvm/llvm-project/commit/12107386ca13f206daf67b06bfe394ba4b2758fb.diff L

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

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

[clang] [AST] Use explicit type erasure in TypeSourceInfo constructor (PR #68435)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/68435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

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

[clang] b4343ab - [clang][ExprConst] Short-circuit ConstantExpr evaluation

2023-10-10 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-10-10T13:27:03+02:00 New Revision: b4343aba9fa12ddb397e08208ec37fcf0fb93864 URL: https://github.com/llvm/llvm-project/commit/b4343aba9fa12ddb397e08208ec37fcf0fb93864 DIFF: https://github.com/llvm/llvm-project/commit/b4343aba9fa12ddb397e08208ec37fcf0fb93864.diff LO

[PATCH] D155548: [clang][ExprConst] Short-circuit ConstantExpr evaluation

2023-10-10 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb4343aba9fa1: [clang][ExprConst] Short-circuit ConstantExpr evaluation (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155548/new/ http

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2023-10-10 Thread via cfe-commits
https://github.com/xbjfk created https://github.com/llvm/llvm-project/pull/68690 This commit adds the /Zc:__STDC__ argument from MSVC, which defines __STDC__. This means, alongside stronger feature parity with MSVC, that things that rely on __STDC__, such as autoconf, can work. Link to MSVC docu

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2023-10-10 Thread via cfe-commits
https://github.com/xbjfk edited https://github.com/llvm/llvm-project/pull/68690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2023-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Reagan (xbjfk) Changes This commit adds the /Zc:\_\_STDC\_\_ argument from MSVC, which defines \_\_STDC_\_. This means, alongside stronger feature parity with MSVC, that things that rely on \_\_STDC\_\_, such as autoconf, can work. Link t

[clang] [analyzer] Fix note for member reference (PR #68691)

2023-10-10 Thread Gábor Spaits via cfe-commits
https://github.com/spaits created https://github.com/llvm/llvm-project/pull/68691 In the following code ` int main() { struct Wrapper {char c; int &ref; }; Wrapper w = {.c = 'a', .ref = *(int *)0 }; w.ref = 1; }` The clang static analyzer will produce the following warnings and note

[clang] 6172960 - [clang][Interp] Basic support for bit fields

2023-10-10 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-10-10T13:38:26+02:00 New Revision: 6172960ceae2cbee743214af59018ea108f231d9 URL: https://github.com/llvm/llvm-project/commit/6172960ceae2cbee743214af59018ea108f231d9 DIFF: https://github.com/llvm/llvm-project/commit/6172960ceae2cbee743214af59018ea108f231d9.diff LO

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

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

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

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

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-10 Thread via cfe-commits
https://github.com/DonatNagyE approved this pull request. Thanks for the updates! Consider adding a "non-const array" testcase for the sake of completeness; but I feel that the patch is also OK as it is now. https://github.com/llvm/llvm-project/pull/68368 __

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

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

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2023-10-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff b4343aba9fa12ddb397e08208ec37fcf0fb93864 49681eace80c60d22e4d9ced4fabe2872f716bab --

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2023-10-10 Thread via cfe-commits
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690 >From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001 From: Reagan Bohan Date: Tue, 10 Oct 2023 11:32:47 + Subject: [PATCH] [clang] Add /Zc:__STDC__ flag to clang-cl This commit adds the /Zc:_

[clang] [analyzer] Fix note for member reference (PR #68691)

2023-10-10 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/68691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix note for member reference (PR #68691)

2023-10-10 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/68691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix note for member reference (PR #68691)

2023-10-10 Thread Gábor Spaits via cfe-commits
https://github.com/spaits ready_for_review https://github.com/llvm/llvm-project/pull/68691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SVE][InstCombine] Delete redundante sel instructions with ptrue (PR #68463)

2023-10-10 Thread via cfe-commits
@@ -800,6 +800,13 @@ instCombineConvertFromSVBool(InstCombiner &IC, IntrinsicInst &II) { static std::optional instCombineSVESel(InstCombiner &IC, IntrinsicInst &II) { + // svsel(ptrue, x, y) => x + auto *OpPredicate = II

[clang] [flang][driver] Mark -fcommon and -mtune as visible in Flang (PR #68657)

2023-10-10 Thread Fangcao Wang via cfe-commits
https://github.com/LittleMeepo edited https://github.com/llvm/llvm-project/pull/68657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix note for member reference (PR #68691)

2023-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gábor Spaits (spaits) Changes In the following code: ```cpp int main() { struct Wrapper {char c; int &ref; }; Wrapper w = {.c = 'a', .ref = *(int *)0 }; w.ref = 1; } ``` The clang static analyzer will produce the following warn

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

2023-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 557670. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154581/new/ https://reviews.llvm.org/D154581 Files: clang/lib/AST/Interp/Descriptor.cpp clang/lib/AST/Interp/Descriptor.h clang/lib/AST/Interp/EvalE

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

2023-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Descriptor.cpp:42 const Descriptor *D) { + new (Ptr) InitMapPtr(std::nullopt); + aaron.ballman wrote: > This worries me a little bit for a few reasons, but it might be okay:

[clang] [analyzer] Fix note for member reference (PR #68691)

2023-10-10 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/68691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [Support] Add KnownBits::computeForSubBorrow (PR #67788)

2023-10-10 Thread Simon Pilgrim via cfe-commits
@@ -332,6 +332,10 @@ struct KnownBits { static KnownBits computeForAddSub(bool Add, bool NSW, const KnownBits &LHS, KnownBits RHS); + /// Compute known bits results from subtracting RHS from LHS. RKSimon wrote: Add to co

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

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. i tried to think of a nicer way to avoid the duplication for discarded statements but..i don't have anything https://github.com/llvm/llvm-project/pull/67306 ___ cfe-commits mailing list cfe

[clang] [analyzer] Fix core.VLASize checker false positive taint reports (PR #68140)

2023-10-10 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68140 >From 4b310278d2923ff718d074a7f7c8806ad03c6401 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 3 Oct 2023 19:58:28 +0200 Subject: [PATCH 1/2] [analyzer] Fix core.VLASize checker false positive taint report

[PATCH] D155850: [HIP][Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-10-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557672. AlexVlx removed reviewers: tra, jlebar. AlexVlx added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp

[clang] [clang-format][NFC] Annotate control statement r_braces (PR #68621)

2023-10-10 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/68621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix note for member reference (PR #68691)

2023-10-10 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/68691 From bb9cb77cab7b073d45c0b998c926a0b60a75a35e Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Tue, 10 Oct 2023 13:40:05 +0200 Subject: [PATCH 1/2] [analyzer] Fix note for member reference --- .../Core/BugRepor

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

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

  1   2   3   >