[clang] [clang] [MinGW] Explicitly always pass the -fno-use-init-array (PR #68571)

2023-10-09 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/68571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a2b8c49 - [clang] [MinGW] Explicitly always pass the -fno-use-init-array (#68571)

2023-10-09 Thread via cfe-commits
Author: Martin Storsjö Date: 2023-10-10T09:55:56+03:00 New Revision: a2b8c49c1839076b540c542c024fcfe2361a3e47 URL: https://github.com/llvm/llvm-project/commit/a2b8c49c1839076b540c542c024fcfe2361a3e47 DIFF: https://github.com/llvm/llvm-project/commit/a2b8c49c1839076b540c542c024fcfe2361a3e47.diff

[clang] [clang] [MinGW] Explicitly always pass the -fno-use-init-array (PR #68571)

2023-10-09 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Whatever we decide to do on the LLVM side, this seems fine for the clang side. Yes, this bit should be fine in any case. > It looks like clang uses the value of UseInitArray for some ObjC stuff, in > addition to passing it to the backend, so we need the right value in clang i

[clang] 5fa5ffe - [Clang] Fix missing diagnostic for non-standard layout type in `offsetof` (#65246)

2023-10-09 Thread via cfe-commits
Author: kasuga-fj Date: 2023-10-10T15:31:21+09:00 New Revision: 5fa5ffeb6cb5bc9aa414c02513e44b8405f0e7cc URL: https://github.com/llvm/llvm-project/commit/5fa5ffeb6cb5bc9aa414c02513e44b8405f0e7cc DIFF: https://github.com/llvm/llvm-project/commit/5fa5ffeb6cb5bc9aa414c02513e44b8405f0e7cc.diff LOG

[clang] [Clang] Fix missing diagnostic for non-standard layout type in `offsetof` (PR #65246)

2023-10-09 Thread via cfe-commits
https://github.com/kasuga-fj closed https://github.com/llvm/llvm-project/pull/65246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D153131: [clang analysis][thread-safety] Handle return-by-reference...

2023-10-09 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. In D153131#4653456 , @aaronpuchert wrote: > In D153131#4653412 , @courbet wrote: > >> I also had some push back internally on adding this to the existing flag. >> I'm going to add `-Wthr

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

2023-10-09 Thread Christian Kissig via cfe-commits
@@ -3764,14 +3768,11 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts, if (Opcode == ISD::ADDE) // Can't track carry from glue, set carry to unknown. Carry.resetAll(); -else if (Opcode == ISD::UADDO_CARRY || Opcode == ISD::S

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

2023-10-09 Thread Christian Kissig via cfe-commits
@@ -3764,14 +3768,11 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts, if (Opcode == ISD::ADDE) // Can't track carry from glue, set carry to unknown. Carry.resetAll(); -else if (Opcode == ISD::UADDO_CARRY || Opcode == ISD::S

[clang] [mlir][OpenMP] Added omp.region operation (PR #65243)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Can this have `omp.yield` as the terminator and be capable of yielding/returning values? https://github.com/llvm/llvm-project/pull/65243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] [mlir][OpenMP] Added omp.region operation (PR #65243)

2023-10-09 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Can this have `omp.yield` as the terminator and be capable of yielding/returning values? https://github.com/llvm/llvm-project/pull/65243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[PATCH] D152279: [Driver] Default -msmall-data-limit= to 0

2023-10-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 557659. MaskRay added a comment. test rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152279/new/ https://reviews.llvm.org/D152279 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/RISCV

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From eb9f8342821048edefaefd038bdd989853ac69a3 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash ---

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-10-09 Thread Sergei Barannikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG79f87be6888d: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc (authored by barannikov88). Changed prior to commit: https://reviews.llvm.org/D159393?vs=557644&id=557657#toc Reposito

[clang] 79f87be - [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-10-09 Thread Sergei Barannikov via cfe-commits
Author: Sergei Barannikov Date: 2023-10-10T09:03:55+03:00 New Revision: 79f87be6888d13a94661be9d8908c83dd2229c9b URL: https://github.com/llvm/llvm-project/commit/79f87be6888d13a94661be9d8908c83dd2229c9b DIFF: https://github.com/llvm/llvm-project/commit/79f87be6888d13a94661be9d8908c83dd2229c9b.d

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

2023-10-09 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > LGTM, When release notes could be nice > (clang-tools-extra/doc/ReleaseNotest.rst) with something like: `Improved > bugprone-unchecked-optional-acces check to not crash during handling of > optional values` or `to not crash i certain situations` it may also not be so > necessa

[clang] -fsanitize=alignment: check memcpy/memmove arguments (PR #67766)

2023-10-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/67766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7926744 - -fsanitize=alignment: check memcpy/memmove arguments (#67766)

2023-10-09 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-10-09T23:02:07-07:00 New Revision: 792674400f6f04a074a3827349ed0e2ac10067f6 URL: https://github.com/llvm/llvm-project/commit/792674400f6f04a074a3827349ed0e2ac10067f6 DIFF: https://github.com/llvm/llvm-project/commit/792674400f6f04a074a3827349ed0e2ac10067f6.diff

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

2023-10-09 Thread Piotr Zegar via cfe-commits
@@ -202,6 +202,10 @@ Changes in existing checks ` check, so that it does not warn on macros starting with underscore and lowercase letter. +- Improved :doc:`bugprone-unchecked-optional-access + ` check, use `cast_or_null` + instead `cast` so that it does not crash durin

[clang] -fsanitize=alignment: check memcpy/memmove arguments (PR #67766)

2023-10-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: Add the test to `clang/test/CodeGen/catch-undef-behavior.c` ca810073b3e4cef8ed58c03dcc724771f8f8615b ``` + /// Casting to void * or char * drops the alignment requirement. + memcpy((void *)p, (char *)q, sz); ``` https://github.com/llvm/llvm-project/pull/67766 _

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 466b612ff055ff7497c9473b38b90bc849370b21 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash ---

[clang] -fsanitize=alignment: check memcpy/memmove arguments (PR #67766)

2023-10-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/67766 >From ca810073b3e4cef8ed58c03dcc724771f8f8615b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 28 Sep 2023 15:22:38 -0700 Subject: [PATCH] -fsanitize=alignment: check memcpy/memmove arguments The -fsaniti

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 38cf358039d81fb3703885db082b64e11760c5fc Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash ---

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

2023-10-09 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, When release notes could be nice (clang-tools-extra/doc/ReleaseNotest.rst) with something like: `Improved bugprone-unchecked-optional-acces check to not crash during handling of optional values` or `to not crash i certain situations`

[clang] -fsanitize=alignment: check memcpy/memmove arguments (PR #67766)

2023-10-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/67766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] -fsanitize=alignment: check memcpy/memmove arguments (PR #67766)

2023-10-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/67766 ___ 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-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 7a8c515c70bb06ae886c8c434d9d3a79a152d115 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash ---

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

2023-10-09 Thread Qiu Chaofan via cfe-commits
@@ -8177,6 +8177,64 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, ecnelises wrote: Can MIR be valid input for legalizers? I see MIR outputs are all legalized.

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

2023-10-09 Thread Qiu Chaofan via cfe-commits
@@ -8177,6 +8177,64 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, ecnelises wrote: Can MIR be valid input for legalizers? I see MIR outputs are all legalized.

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

2023-10-09 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/67301 >From 92abb76631594dfc2ca586c46c38031610be0548 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 25 Sep 2023 17:08:59 +0800 Subject: [PATCH 1/2] [Legalizer] Expand fmaximum and fminimum According to langre

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

2023-10-09 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/67301 >From 92abb76631594dfc2ca586c46c38031610be0548 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 25 Sep 2023 17:08:59 +0800 Subject: [PATCH 1/2] [Legalizer] Expand fmaximum and fminimum According to langre

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

2023-10-09 Thread Qizhi Hu via cfe-commits
@@ -599,7 +599,7 @@ void transferAssignment(const CXXOperatorCallExpr *E, BoolValue &HasValueVal, LatticeTransferState &State) { assert(E->getNumArgs() > 0); - if (auto *Loc = cast( + if (auto *Loc = dyn_cast_or_null( jcsxky wrote:

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 3978a4322ed7f82b52a1978debe8108f00f18acc Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash ---

[clang-tools-extra] [clang][dataflow]Use dyn_cast_or_null instead cast to prevent crash (PR #68510)

2023-10-09 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > please update release note also Although `bugprone-unchecked-optional-access` is used to test this issue, root cause is in `FlowSensitiveAnalysis`. So, I am confused about which file should be updated about release not. Look forward to your suggestion! Thank you. https://githu

[clang-tools-extra] [clang][dataflow]Use dyn_cast_or_null instead cast to prevent crash (PR #68510)

2023-10-09 Thread Congcong Cai via cfe-commits
@@ -599,7 +599,7 @@ void transferAssignment(const CXXOperatorCallExpr *E, BoolValue &HasValueVal, LatticeTransferState &State) { assert(E->getNumArgs() > 0); - if (auto *Loc = cast( + if (auto *Loc = dyn_cast_or_null( HerrCai0907 w

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

2023-10-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: please update release note also 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

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

2023-10-09 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM, just fill out the description with some more details so folks reading git log will have more context, https://github.com/llvm/llvm-project/pull/67147 ___ cfe-commits mailing list cfe-commits@

[PATCH] D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

2023-10-09 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148474/new/ https://reviews.llvm.org/D148474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D158069: [clang][Interp] Fix getIndex() for composite array elements

2023-10-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 557656. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158069/new/ https://reviews.llvm.org/D158069 Files: clang/lib/AST/Interp/Context.h clang/lib/AST/Interp/Pointer.h clang/unittests/AST/CMakeLists.txt clang/unittests/AST/Interp/CMakeLists.t

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

2023-10-09 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The fix looks great to me! On the other hand, we usually try to add a > regression test for each of the fixes. Any chance you could get a minimal > reproducer from the codebase you are looking at? Thanks for your suggestion! Test case has been added to reproduce this issue. ht

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

2023-10-09 Thread Trevor Gross via Phabricator via cfe-commits
tmgross accepted this revision. tmgross added a comment. Tested that this patch applied on top of `main` fixes all i128 ABI issues among gcc, clang, and rustc. Probably would be good to add https://bugs.llvm.org/show_bug.cgi?id=50198 to the test suite if it isn't there already. Thanks for stic

[clang] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-09 Thread Qiu Chaofan via cfe-commits
@@ -219,9 +234,14 @@ extern __inline __m128 */ __asm__("" : : "wa"(__r)); /* Restore enabled exceptions. */ -__fpscr_save.__fr = __builtin_mffsl(); +#ifdef _ARCH_PWR9 +__fpscr_save.__fr = __builtin_ppc_mffsl(); +#else +__fpscr_save.__fr = __builtin_ppc

[clang] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

2023-10-09 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/67299 >From 2d628587b9cede36e7a93ecb1414cc0c16596934 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 25 Sep 2023 17:06:26 +0800 Subject: [PATCH 1/2] [PowerPC] Fix use of FPSCR builtins in smmintrin.h smmintrin

[clang] -fsanitize=alignment: check memcpy/memmove arguments (PR #67766)

2023-10-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/67766 >From 24d675673844f22e8aef8dc183874696216abb1d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 28 Sep 2023 15:22:38 -0700 Subject: [PATCH 1/2] -fsanitize=alignment: check memcpy/memmove arguments Similar

[clang-tools-extra] [clang][dataflow]Use dyn_cast_or_null instead cast to prevent crash (PR #68510)

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 2de967931684cf792a7fc4708c18b867b47a9b3d Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash ---

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

2023-10-09 Thread Christian Kissig via cfe-commits
https://github.com/christiankissig updated https://github.com/llvm/llvm-project/pull/67788 >From 5d86936c3a48c613460983c980271fcab8128b75 Mon Sep 17 00:00:00 2001 From: Christian Kissig Date: Tue, 26 Sep 2023 12:18:59 + Subject: [PATCH 1/6] [Support] Add KnownBits::computeForSubBorrow * Im

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

2023-10-09 Thread Christian Kissig via cfe-commits
https://github.com/christiankissig updated https://github.com/llvm/llvm-project/pull/67788 >From 5d86936c3a48c613460983c980271fcab8128b75 Mon Sep 17 00:00:00 2001 From: Christian Kissig Date: Tue, 26 Sep 2023 12:18:59 + Subject: [PATCH 1/6] [Support] Add KnownBits::computeForSubBorrow * Im

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

2023-10-09 Thread Fangcao Wang via cfe-commits
https://github.com/LittleMeepo created https://github.com/llvm/llvm-project/pull/68657 None >From 490145aaa74fc936682344162ba1340b65c2bebc 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

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

2023-10-09 Thread Christian Kissig via cfe-commits
https://github.com/christiankissig updated https://github.com/llvm/llvm-project/pull/67788 >From 5d86936c3a48c613460983c980271fcab8128b75 Mon Sep 17 00:00:00 2001 From: Christian Kissig Date: Tue, 26 Sep 2023 12:18:59 + Subject: [PATCH 1/5] [Support] Add KnownBits::computeForSubBorrow * Im

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

2023-10-09 Thread Christian Kissig via cfe-commits
https://github.com/christiankissig updated https://github.com/llvm/llvm-project/pull/67788 >From 5d86936c3a48c613460983c980271fcab8128b75 Mon Sep 17 00:00:00 2001 From: Christian Kissig Date: Tue, 26 Sep 2023 12:18:59 + Subject: [PATCH 1/5] [Support] Add KnownBits::computeForSubBorrow * Im

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

2023-10-09 Thread Denali Lumma via cfe-commits
dlumma wrote: It seems like this PR is ready to land. Any reason why it has not been integrated @christiankissig ? https://github.com/llvm/llvm-project/pull/67788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

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

2023-10-09 Thread Denali Lumma via cfe-commits
dlumma wrote: It seems like this PR is ready to land. Any reason why it has not been integrated @christiankissig ? https://github.com/llvm/llvm-project/pull/67788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang][OHOS] Keep ARM ABI selection logic in sync between Clang and LLVM (PR #68656)

2023-10-09 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/68656 None >From d95c16f82bbdcc58c36b8191632b07b6857d7908 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 9 Oct 2023 22:41:36 -0400 Subject: [PATCH] [Clang][OHOS] Keep ARM ABI selection logic in sync between Clang

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-09 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 edited https://github.com/llvm/llvm-project/pull/68476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-09 Thread Chen Zheng via cfe-commits
@@ -807,7 +807,7 @@ ArrayRef PPCTargetInfo::getGCCRegAliases() const { // PPC ELFABIv2 DWARF Definitoin "Table 2.26. Mappings of Common Registers". // vs0 ~ vs31 is mapping to 32 - 63, // vs32 ~ vs63 is mapping to 77 - 108. chenzheng1030 wrote: This is what I

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

2023-10-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/68646 >From ffc9412252cd0e046978f183384375580bd31245 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Oct 2023 07:52:06 +0800 Subject: [PATCH 1/3] [clang]Avoid diagnoise invalid consteval call for invalid

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

2023-10-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/68646 >From ffc9412252cd0e046978f183384375580bd31245 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Oct 2023 07:52:06 +0800 Subject: [PATCH 1/2] [clang]Avoid diagnoise invalid consteval call for invalid

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

2023-10-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s + +// expected-note@+2{{candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'S &&' for 1st argument}} erichkeane wrote: Can you use the bookm

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

2023-10-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Needs a release note, plus a couple nits. Otherwise LGTM! 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/

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

2023-10-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s + +// expected-note@+2{{candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'S &&' for 1st argument}} +// expected-note@+1{{candidate constructor (the implicit

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

2023-10-09 Thread Erich Keane via cfe-commits
@@ -18406,9 +18406,10 @@ static void EvaluateAndDiagnoseImmediateInvocation( FD = Call->getConstructor(); else if (auto *Cast = dyn_cast(InnerExpr)) FD = dyn_cast_or_null(Cast->getConversionFunction()); - erichkeane wrote: Unrelated change. ht

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

2023-10-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited 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] [C++20] [Modules] Don't emit function bodies which is noinline and av… (PR #68501)

2023-10-09 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/68501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b5dffd4 - [C++20] [Modules] Don't emit function bodies which is noinline and av… (#68501)

2023-10-09 Thread via cfe-commits
Author: Chuanqi Xu Date: 2023-10-10T09:47:13+08:00 New Revision: b5dffd4957dfb58c73e168a3d9b6967f03b23a6c URL: https://github.com/llvm/llvm-project/commit/b5dffd4957dfb58c73e168a3d9b6967f03b23a6c DIFF: https://github.com/llvm/llvm-project/commit/b5dffd4957dfb58c73e168a3d9b6967f03b23a6c.diff LO

[clang] [C++20] [Modules] Don't emit function bodies which is noinline and av… (PR #68501)

2023-10-09 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Yeah, of course. https://github.com/llvm/llvm-project/pull/68501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Support vector swizzles on scalars (PR #67700)

2023-10-09 Thread Justin Bogner via cfe-commits
@@ -1950,6 +1950,10 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { while (isPreprocessingNumberBody(C)) { CurPtr = ConsumeChar(CurPtr, Size, Result); PrevCh = C; +if (LangOpts.HLSL && C == '.' && (*CurPtr == 'x' || *CurPtr == 'r')) { +

[clang] [HLSL] Support vector swizzles on scalars (PR #67700)

2023-10-09 Thread Justin Bogner via cfe-commits
@@ -930,7 +930,11 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, // and FP constants (specifically, the 'pp-number' regex), and assumes that // the byte at "*end" is both valid and not part of the regex. Because of // this, it doesn't have to check

[clang] [X86][NFC]Update test cases after D159250 (PR #68517)

2023-10-09 Thread via cfe-commits
https://github.com/XinWang10 closed https://github.com/llvm/llvm-project/pull/68517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 057ec76 - [X86][NFC]Update test cases after D159250 (#68517)

2023-10-09 Thread via cfe-commits
Author: XinWang10 Date: 2023-10-10T09:32:32+08:00 New Revision: 057ec767add8d4030beb5b78b706dcf134269c2b URL: https://github.com/llvm/llvm-project/commit/057ec767add8d4030beb5b78b706dcf134269c2b DIFF: https://github.com/llvm/llvm-project/commit/057ec767add8d4030beb5b78b706dcf134269c2b.diff LOG

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-09 Thread Hubert Tong via cfe-commits
@@ -807,7 +807,7 @@ ArrayRef PPCTargetInfo::getGCCRegAliases() const { // PPC ELFABIv2 DWARF Definitoin "Table 2.26. Mappings of Common Registers". // vs0 ~ vs31 is mapping to 32 - 63, // vs32 ~ vs63 is mapping to 77 - 108. hubert-reinterpretcast wrote: I am

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

2023-10-09 Thread via cfe-commits
@@ -97,6 +97,17 @@ void strlen_constant2(char x) { clang_analyzer_eval(strlen(a) == 3); // expected-warning{{UNKNOWN}} } +const char *const global_str_ptr = "abcd"; luamfb wrote: I've added a new test to cover this too. Since non-const pointers can be chan

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

2023-10-09 Thread via cfe-commits
@@ -930,9 +930,24 @@ SVal CStringChecker::getCStringLength(CheckerContext &C, ProgramStateRef &state, const StringLiteral *strLit = cast(MR)->getStringLiteral(); return svalBuilder.makeIntVal(strLit->getLength(), sizeTy); } + case MemRegion::NonParamVarRegionKind: {

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

2023-10-09 Thread via cfe-commits
https://github.com/luamfb updated https://github.com/llvm/llvm-project/pull/68368 >From 1f0249fdb0cf7b1799eb9e532bfbb4a3ffe983b0 Mon Sep 17 00:00:00 2001 From: luamfb Date: Thu, 5 Oct 2023 21:50:10 -0300 Subject: [PATCH 1/2] [analyzer] Compute length of string literal initializers (#66990) --

[clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-10-09 Thread via cfe-commits
modiking wrote: > > > > > Yes there are tradeoffs to doing this purely with whole program class > > > > > hierarchy analysis vs with profiled type info, and in fact they can > > > > > be complementary. For example, the profile info can indicate what > > > > > order to do the vtable comparisons

[clang] [ELF] Making cdsort default for function reordering (PR #68638)

2023-10-09 Thread via cfe-commits
https://github.com/spupyrev updated https://github.com/llvm/llvm-project/pull/68638 >From 9ae8e860296e77dbb4f0ba4332c133827ff0dd9f Mon Sep 17 00:00:00 2001 From: spupyrev Date: Mon, 9 Oct 2023 14:11:21 -0700 Subject: [PATCH 1/3] [ELF] Making cdsort default for function reordering --- lld/ELF/

[clang] [ELF] Making cdsort default for function reordering (PR #68638)

2023-10-09 Thread via cfe-commits
https://github.com/spupyrev updated https://github.com/llvm/llvm-project/pull/68638 >From 9ae8e860296e77dbb4f0ba4332c133827ff0dd9f Mon Sep 17 00:00:00 2001 From: spupyrev Date: Mon, 9 Oct 2023 14:11:21 -0700 Subject: [PATCH] [ELF] Making cdsort default for function reordering --- lld/ELF/Driv

[clang] [ELF] Making cdsort default for function reordering (PR #68638)

2023-10-09 Thread via cfe-commits
https://github.com/spupyrev updated https://github.com/llvm/llvm-project/pull/68638 >From 9ae8e860296e77dbb4f0ba4332c133827ff0dd9f Mon Sep 17 00:00:00 2001 From: spupyrev Date: Mon, 9 Oct 2023 14:11:21 -0700 Subject: [PATCH] [ELF] Making cdsort default for function reordering --- lld/ELF/Driv

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-09 Thread Anton Rydahl via cfe-commits
@@ -0,0 +1,41 @@ +//===--===// +// +// 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: Apac

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-09 Thread Anton Rydahl via cfe-commits
https://github.com/AntonRydahl edited https://github.com/llvm/llvm-project/pull/66968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-09 Thread Anton Rydahl via cfe-commits
https://github.com/AntonRydahl edited https://github.com/llvm/llvm-project/pull/66968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-09 Thread Anton Rydahl via cfe-commits
@@ -0,0 +1,87 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-09 Thread Anton Rydahl via cfe-commits
@@ -0,0 +1,87 @@ +//===--===// +// +// 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: Apac

[clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-10-09 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > > > > Yes there are tradeoffs to doing this purely with whole program class > > > > hierarchy analysis vs with profiled type info, and in fact they can be > > > > complementary. For example, the profile info can indicate what order to > > > > do the vtable comparisons (i.e

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

2023-10-09 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. Explicitly still ok with this as well. Thanks for continuing here. :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86310/new/ https://reviews.llvm.org/D86310 _

[clang] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2023-10-09 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 ac0dda894231e6281e7739aa0ea01a4e9697c747 bdccf1e7858826b5f41791cd0826f9e230de9197 --

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

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes Fixes:#68542 It is meaningless to diagnose further error for a invalid function declaration. --- Full diff: https://github.com/llvm/llvm-project/pull/68646.diff 2 Files Affected: - (modified) clang/lib

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

2023-10-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/68646 Fixes:#68542 It is meaningless to diagnose further error for a invalid function declaration. >From ffc9412252cd0e046978f183384375580bd31245 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Oct 2023

[clang] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2023-10-09 Thread Jan Svoboda via cfe-commits
@@ -168,6 +170,12 @@ class DependencyScanningFilesystemSharedCache { /// The backing storage for cached contents. llvm::SpecificBumpPtrAllocator ContentsStorage; +/// Map from filenames to cached real paths. +llvm::StringMap RealPathsByFilename; ---

[clang] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2023-10-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This PR starts caching calls to `DependencyScanningWorkerFilesystem::getRealPath()` that we use whenever we canonicalize module map path. In the case of the real VFS, this functions performs an expensiv

[clang] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2023-10-09 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/68645 This PR starts caching calls to `DependencyScanningWorkerFilesystem::getRealPath()` that we use whenever we canonicalize module map path. In the case of the real VFS, this functions performs an expensive s

[clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-10-09 Thread Mingming Liu via cfe-commits
@@ -18,11 +18,16 @@ * pointers to the live data in memory. This function is probably not what you * want. Use __llvm_profile_get_size_for_buffer instead. Use this function if * your program has a custom memory layout. + * NOTE: The change of function signature requires mo

[clang] [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-10-09 Thread James Y Knight via cfe-commits
jyknight wrote: > This pull request implements the entirety of the now-accepted N3017 - > Preprocessor Embed. Amazing! I had started to think about looking into getting this implemented recently, so it's really nice to see an implementation uploaded now! > I have no intention of following up

[clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-10-09 Thread Mingming Liu via cfe-commits
@@ -177,13 +195,22 @@ VALUE_PROF_FUNC_PARAM(uint32_t, CounterIndex, Type::getInt32Ty(Ctx)) VALUE_PROF_KIND(IPVK_IndirectCallTarget, 0, "indirect call target") /* For memory intrinsic functions size profiling. */ VALUE_PROF_KIND(IPVK_MemOPSize, 1, "memory intrinsic functions si

[clang] [analyzer] Extend EnumCastOutOfRange diagnostics (PR #68191)

2023-10-09 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Overall looks good, but I think there are no tests that would showcase what trackexpression is actually doing. https://github.com/llvm/llvm-project/pull/68191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-10-09 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: How well does this check work with bitwise enums? People often write code like: ``` enum AnimalFlags { HasClaws = 1, CanFly = 2, EatsFish = 4, Endangered = 8 }; AnimalFlags operator|(AnimalFlags a, AnimalFlags b) { return static_cast(static_cast(a)

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

2023-10-09 Thread via cfe-commits
weltschildkroete wrote: > Thanks for this patch! Thank you for the feedback and for your patience. :-) It should be fixed now (hopefully!) https://github.com/llvm/llvm-project/pull/68540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

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

2023-10-09 Thread via cfe-commits
https://github.com/weltschildkroete updated https://github.com/llvm/llvm-project/pull/68540 >From 7e62fe6179dc63e9930a77c6996ae651d4489aa2 Mon Sep 17 00:00:00 2001 From: Leonardo Duarte Date: Sun, 8 Oct 2023 12:59:15 +0200 Subject: [PATCH] [clang][Sema] Emit more specific diagnostic for auto in

[clang] [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-10-09 Thread via cfe-commits
h-vetinari wrote: > Because I don't know of any better way to commandeer a patch in GitHub As a maintainer, you can push into this branch (unless @ThePhD unchecked the default setting when creating the PR), including forcefully. For example (you could also use the github CLI, but I'm using van

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

2023-10-09 Thread Takuya Shimizu via cfe-commits
hazohelet wrote: Ping 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-tools-extra] Diagnose problematic uses of constructor/destructor attribute (PR #67673)

2023-10-09 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/67673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >